The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

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

Aw: Why isn't there a createline to go with createpoint?


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

 
on: Sat 03 of Jan, 2009 [20:11 UTC] reads: 11343

Show posts:
 
Language