The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->Why isn't there a createline to go with createpoint?

DavidBakin
3 stars
Why isn't there a createline to go with createpoint?


I've never really understood the limitation that in Cindyscript you can't create arbitrary geometric elements. I see that in v2.1 you've added createpoint. What above createline and the rest of the geometric objects?

Here's a function I'd like to have: Dual. I'd like to take an existing construction that consists of lines and points and make the dual construction (projectively speaking): points <-> lines. But I don't want to just draw the dual, I want it to be a real construction, where free points go to free lines and vice versa. (For this purpose, a free line is a "line through a single (free) point".) Then I want to select and move the lines and points around with the mouse in the dual construction just like in the original construction, and use them with other toolbar functions, etc.

(It would actually be nice to have a built-in that worked off the toolbar for Dual. It would work off the selected objects, ignoring those which were constructed in ways that don't work in projective geometry, i.e., anything that depends on a metric. Lines, points, joins, meets, conic through 5 points should all work though.)

-- David

 
on: Sat 03 of Jan, 2009 [19:19 UTC] reads: 126411

Posted messages

author message
Aw: Why isn't there a createline to go with createpoint?
on: Sat 03 of Jan, 2009 [20:11 UTC]
David,

actually you *can* create arbitrary elements with CindyScript starting with version 2.1, there is just no documentation yet.

You can create a line between elements A and B using the following Code:

create(["a"],"Join",[A,B]);


The "Join" parameter describes the algorithm to be used, the [A,B] parameter is the list of inputs. You can find out about what to put there using the algorithm() and inputs() functions. For example, if you create a circle C0 through A and B, then algorithm(C0) yields "CircleMP" and inputs(C0) will be [A,B].

As with the createpoint function, nothing will be created if there exists an element with the same name already. Also, there might be multiple outputs of an algorithm, this is the reason for the list of names (["a"] instead of "a" in the code example above).

Happy scripting,

Ulli


author message
DavidBakin
3 stars
Re: Aw: Why isn't there a createline to go with createpoint?
on: Sat 03 of Jan, 2009 [20:22 UTC]
biggrin Oh boy! Thanks! — David




Show posts:
 
Language