The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->CindyScript - problem with circles->Re: CindyScript - problem with circles

cameyo
3 stars
Re: CindyScript - problem with circles


Hi Veljko Vranić,

this can be a solution.
Put the following code on Mouse Click Section of Script Editor.
Then click on canvas (with Move Element tool) to draw the objects.

// first set of points
// THIS WORKS
// intersection at y = 0
A = [12,8];
B = [21,-4];
C = [11,-3];
D = [25,3];

// second set of points
// THIS DON'T WORKS
// intersection at y  0
// the circle is draw reflected on X axes
//A = [3,4];
//B = [10,12];
//C = [10,2];
//D = [1,8];

// circle radius
radius = 2;
// segments
m = join(A,B);
n = join(D,C);
// lines
a = parallel(A,m);
b = parallel(C,n);
// intersection point
inter = meet(a,b);
// circle
k = circle(inter,radius);
// draw(A,B);
// draw(C,D);
// drawcircle(I,8);
// draw points, lines, circles and intersection point
drawall([A,B,C,D,a,b,k,inter]);


But there is a problem:
if you try the seconds set of points (uncomment it and comment first set) the circle is wrong.
It is drawed as reflected on X axes.

Is it my mistake OR is a bug ??

Help us Kortenkamp biggrin


Have a nice day.

p.s. Anyway, you can't interact with objects created from CindyScript.
They are different from standard geometric objects (construction objects).


attachment forumCreate.cdy (1.96 Kb)
 
on: Fri 01 of Mar, 2013 [16:59 UTC] reads: 11370

Show posts:
 
Language