The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->Creating new points in script

dirkd
3 stars
Creating new points in script


As I understand it, it is impossible to create new points in Cindyscript (I mean real geometric objects, that can attach segments to, not just dots on the screen). If I want to construct a perspective view of a cube, I have to manually construct 8 free points, label them by hand in some systematic way and then calculate the right coordinates in Cindyscript, all the time being very careful not to use the wrong labels in the calculation. Frankly, I don't understand why it isn't possible to generate free points, with apropriate labels, directly in script. This would make it possible to write much more general programs that could easily be re-used across different constructions. Some idea for a future update?

The documentation on Cindyscript could use some elaboration. I was a bit confused at first about the importance of the ';'-operator. Not getting any error messages doesn't make things easier. Couldn't error messages be turned on or off by the user? Preferably in each script-module seperately? That way, thouroughly debugged scripts might have error messaging turned of, while experimental script lines could have them on. I'm not sure I understand the event 'Initialising'. Is this part of the script just evaluated once? Or is is evaluated most often, previous to all other events?

 
on: Sun 09 of Jul, 2006 [14:50 UTC] reads: 107314

Posted messages

author message
Richter
1 stars
Aw: Creating new points in script
on: Wed 12 of Jul, 2006 [12:31 UTC]
Dear Dirkd

> As I understand it, it is impossible to create new points in Cindyscript (I mean real geometric objects, that can attach segments to, not just dots on the screen).

Yes currently this is impossible. It will be made available in one of the further updates. The problem is that if we allow a script to generate points, the internal data structure, may be messed up very easily. In particular there is a problem with the persistence of points generated by a script.

> If I want to construct a perspective view of a cube, I have to manually construct 8 free points, label them by hand in some systematic way and then calculate the right coordinates in Cindyscript, all the time being very careful not to use the wrong labels in the calculation.

In fact there are many other ways in Cinderella to generate a perspective view of a cube. You could either make a geometric construction (this is not too difficult) or you could use projective transformations or bases

> Frankly, I don't understand why it isn't possible to generate free points, with apropriate labels, directly in script. This would make it possible to write much more general programs that could easily be re-used across different constructions. Some idea for a future update?

Yes indeed I am also urgently looking for this feature. If we solved all conceptiual problems it will be available.

>
> The documentation on Cindyscript could use some elaboration. I was a bit confused at first about the importance of the ';'-operator.

Yes it is important :-)


> Not getting any error messages doesn't make things easier. Couldn't error messages be turned on or off by the user? Preferably in each script-module seperately? That way, thouroughly debugged scripts might have error messaging turned of, while experimental script lines could have them on.

No bad idea we will think about it.

> I'm not sure I understand the event 'Initialising'. Is this part of the script just evaluated once? Or is is evaluated most often, previous to all other events?

Initialize is called once when the scipt is parsed.

It is the best place to setup initial functions or variables.


All the best

Jürgen (Richter-Gebert)





Show posts:
 
Language