[futurebasic] Re:[FB] Circlular Printing

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2001 : Group Archive : Group : All Groups

From: "Pierre SIMON" <pierre-a.simon@...>
Date: Sat, 29 Sep 2001 17:36:08 +0200
> I would like to print some individual letters in a circular
pattern but
> can't seem to nut it out.
>
> For simplicity sake say there was 36 letters that I want to
go around the
> circumference how would I calculate their positions? Any
suggestions?

To calculate the positions of points in a circle, you need to
use sinus and cosinus. Here is an example that should solve
your problem :

dim as double x,y

_numPoints = 36
_centerX = 100
_centerY = 100
_radius  = 50
_angle   = (360/_numPoints)

dim count
for count = 1 to _numPoints
y = sin(_angle*count * pi# / 180)
y = y*_radius : y += _centerY
x = cos(_angle*count * pi# / 180)
x = x*_radius : x += _centerX
plot x,y
next

I hope this will help.

Pierre Simon



---------------------------------------

"Ce message vous est envoyé par laposte.net - web : www.laposte.net/  minitel : 3615 LAPOSTENET (0,84 F TTC la minute)/ téléphone : 08 92 68 13 50 (2,21 F TTC la minute)"