to make an elipse with oval comand or anyway

Blitz3D Forums/Blitz3D Beginners Area/to make an elipse with oval comand or anyway

bashc(Posted 2009) [#1]
I would like to know if there is any way to do a diagonal/inclinate elipse usign oval command or any other way. Oval command returns a vertical-horizontal elipse only.




fox95871(Posted 2009) [#2]
Does it have to be coded? If not you could always make it in Photoshop then use RotateImage. If it does have to be coded, maybe make the oval, screenshot it to a bmp (I can't remember the command for that right now, maybe CaptureImage?) then load that image and use RotateImage.


bashc(Posted 2009) [#3]
fox95871

I need for a simulated planet orbit. Rotateimage does not work for what I need. Thanks.


Zethrax(Posted 2009) [#4]
You'll probably need to use the pixel drawing commands, and experiment with the sine, cosine, tangent, etc, functions. You can find relevant math equations and other information at: http://en.wikipedia.org/wiki/Ellipse


bashc(Posted 2009) [#5]
I have used this code, but it returns only vertical and horizontal elipses.

xcentre=150
ycentre=150
xdiam=120
ydiam=80

For j=0 To 359 
x=xdiam*Sin(j)+xcentre
y=ydiam*Cos(j)+ycentre 
Plot x,y
Next
WaitKey


I will try to fix. thanks


GIB3D(Posted 2009) [#6]
Added

XOffset=0
YOffset=45


and changed

Plot x+(Sin(XOffset+j)*XOffset),y+(Cos(YOffset+j)*YOffset)




Just messin around though, just change the offsets and.. it will do... stuff lol.


bashc(Posted 2009) [#7]
Ohh! it seems to be as easy (when you know how to do lol) but I didnt not to do and I was trying without to be succesfull.
Only two variables added make it has sense O_O lol


Than you very much GIA_Green_Fire_ . I will adapte you idea for to do a irregular elipse into my code :):):)