for i : 1 .. 3
drawline (round (controlPoints (i).x), round (controlPoints (i).y), round (controlPoints (i + 1).x), round (controlPoints (i + 1).y), 22)
end for
for i : 1 .. 100
hold := holdNext
holdNext := PointOnCurve ((i + 1) / 100)
drawline (round (hold.x), round (hold.y), round (holdNext.x), round (holdNext.y), 42)
end for
for i : 1 .. 4
drawoval (round (controlPoints (i).x), round (controlPoints (i).y), 5, 5, 103)
end for
end DrawCurve
var x, y, z : int
loop
mousewhere (x, y, z)
DrawCurve
for i : 1 .. 4
if sqrt ((controlPoints (i).x - x) * (controlPoints (i).x - x) + (controlPoints (i).y - y) * (controlPoints (i).y - y)) <= 5 and z = 1 then
loop
mousewhere (x, y, z)
DrawCurve
controlPoints (i).x := x
controlPoints (i).y := y
exit when z = 0
View.Update
drawfillbox (0, 0, maxx, maxy, 7)
end loop
end if
end for
View.Update
drawfillbox (0, 0, maxx, maxy, 7)
end loop
Sponsor Sponsor
zylum
Posted: Tue Mar 02, 2004 9:23 pm Post subject: (No subject)
wow that is really nice... im going to try and recreate that without looking at the code
+20 bits
-zylum
Tony
Posted: Tue Mar 02, 2004 10:38 pm Post subject: (No subject)
sweet anyone wants to write up a vector design app (adobe illustrator) in turing?
Posted: Tue Mar 02, 2004 11:12 pm Post subject: (No subject)
that is really really nice
jonos
Posted: Wed Mar 03, 2004 8:15 am Post subject: (No subject)
yeah, awesome.
recneps
Posted: Wed Mar 03, 2004 3:53 pm Post subject: (No subject)
Nice indeed. That has many many possibilities.
shorthair
Posted: Wed Mar 03, 2004 5:09 pm Post subject: (No subject)
Once again , 2 thumbs up , just a quality app catalyst , i really like it , your code is just crazy you have areally really unique style
the_short1
Posted: Fri Mar 12, 2004 2:16 pm Post subject: (No subject)
crzy,,,, taht lookz realy nice... and black backround.. YAY someone makes it look good...
does anyone know the proper slope to get a circle...
like for drawing a line at a central point and rotating it do a nice circle.. whenever i try i only get it to / and \ not round
x += ?
y +=?
y := ?x + ? blah blah blah...
i should know this cuz we did sometihgn similiar to it in math.. but i forget the slope now but i dont got my bookz with me... thx..
Sponsor Sponsor
jonos
Posted: Fri Mar 12, 2004 3:22 pm Post subject: (No subject)
you have to square the y or x coordinates to get a parabola (i think, we haven't done that in math yet).
the_short1
Posted: Fri Mar 12, 2004 3:31 pm Post subject: (No subject)
i have the exact formula but its at school . . im on march break as as yesterday...
Tony
Posted: Fri Mar 12, 2004 4:03 pm Post subject: (No subject)
Posted: Fri Mar 12, 2004 6:21 pm Post subject: (No subject)
That only applies to a circle from the origin.
I believe the general eqn for a cirle on a Cartesian place is:
(y-p)^2 + (x-q)^2 = r^2
Or something to that effect...urgh..Gr11 maths haunting again.
the_short1
Posted: Fri Mar 12, 2004 10:36 pm Post subject: (No subject)
thanxTony... thats it ..or at least thats was the formula i remember....
SuperGenius
Posted: Fri Mar 19, 2004 2:38 pm Post subject: (No subject)
the formula for the radius of a circle that my tracher told us is:
r=sqrt ((x2-x1)** + (y2-y1)**)
jonos
Posted: Fri Mar 19, 2004 3:07 pm Post subject: (No subject)
i think they are the same, because one of your x,y is the center of the circle and the other is a point on the circle, so the radius is the the length of that (i think)