3D square using sin/cos ?
Posted: Sun Aug 26, 2018 10:48 am
I have this simple loop...
Basically should have been step 90 ...
Though I can draw a nice circle just fine, but I am having trouble calculating where points would be in a square, IE, all 4 corners... I always seem to end up with either 3 or 5 points... like it will draw the first 3 corners of the square, then the 4th ends up near the start of the first one or something mad... other times I basically end up with a hex shape
The example is mess of course... Basically just adding 320 to X for center screen, 100 Y... then multiple by 150,90 for the diameter of the circle.
Really just trying to do a simple 2D spinning square here, of course I can do the rotate part it seems fine, but can't seem to plot 90deg angles with the thing...
Anyone any ideas how to do a spinning square, am I just going about it all wrong ?!
Basically should have been step 90 ...
Though I can draw a nice circle just fine, but I am having trouble calculating where points would be in a square, IE, all 4 corners... I always seem to end up with either 3 or 5 points... like it will draw the first 3 corners of the square, then the 4th ends up near the start of the first one or something mad... other times I basically end up with a hex shape
The example is mess of course... Basically just adding 320 to X for center screen, 100 Y... then multiple by 150,90 for the diameter of the circle.
Really just trying to do a simple 2D spinning square here, of course I can do the rotate part it seems fine, but can't seem to plot 90deg angles with the thing...
Anyone any ideas how to do a spinning square, am I just going about it all wrong ?!