Here is a little method that draws a star
// draw a star
function star(h as integer, k as integer, g as graphics)
const R = 9
const S = 3
const Pi = 3.14159
const Phi = .628318 // = π/5
dim i as integer
dim x(10), y(10), points(20) as integer
dim theta as single
theta = Pi / 2
for i = 1 to 10 step 2
x(i) = h + R*cos(theta)*scale
y(i) = k - R*sin(theta)*scale
theta = theta - Phi
x(i+1) = h + S*cos(theta)*scale
y(i+1) = k - S*sin(theta)*scale
theta = theta - Phi
//transfer to the point array that will be used to plot
points( 2*i -1 ) = x(i)
points( 2*i ) = y(i)
points( 2*i + 1 ) = x(i+1)
points( 2*i + 2 ) = y(i+1)
next
g.FillPolygon points
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>