Click the links below to explore the different sections of our site. If you have any questions about our products or services, don't hesitate to contact us.
Following are a number of links to pages that might interest you as a visitor of this web site.
copyright © 2005-07 by Mark Schonewille & Economy-x-Talk

Economy-x-Talk - Sample Scripts

Draw Circle and Check Point

You can draw a circle by plotting sin(angle) *radius, cos(angle)
*radius. Just run through to angles from 0 - 2pi. You can cheat the
other test by using Pythagoras to see if the distance from the center
of the circle is <= the radius of the circle.

Colin Holgate





on drawcircle theradius,thelocation
   choose line tool
   put item 1 of thelocation into h
   put item 2 of thelocation into v
   put round(h + sin(0)*theradius) into x
   put round(v + cos(0)*theradius) into y
   drag from x,y to x,y
   put x into oldx
   put y into oldy
   repeat with a = 0 to 628
     put a*.01 into theangle
     put round(sin(theangle)*theradius)+h into x
     put round(cos(theangle)*theradius)+v into y
     drag from oldx,oldy to x,y
     put x into oldx
     put y into oldy
   end repeat
   choose browse tool
end drawcircle

function insidecircle circleloc,circleradius,thelocation
   put item 1 of thelocation - item 1 of circleloc into dx
   put item 2 of thelocation - item 2 of circleloc into dy
   return sqrt(dx*dx+dy*dy)<=circleradius
end insidecircle

on doTheTask
  drawCircle 30,"130,180"
  show window "tools" --use the eraser tool
end doTheTask





Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars.This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you.
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.