stickleprojects Level: Moderator

 Registered: 09-09-2002 Posts: 891
|
Re: Graphics
Hi,
What do you mean by a "soft line", using Radians and pythag, it's quite easy to draw a line at any angle. There are loads of theories on it (especially when optimising graphics).
E.g.
Using SOHCAHTOA maths:
for Point (x,y)
Target point (i,y) at 30 units long, at 30 deg from vertical is:
dim rads as single
rads = 180 ' a radion is a 0.5*pi(? check with the other programmers)
dim degs as single
degs = rads / 6
dim h as single
h = 30
dim i as single, j as single
i = sin(degs)/h
j = sin(degs)*h
Hope this helps (my math is a bit rusty)
Kieron
PS. Search for "line drawing algorithms" in google for more
____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)
|