View Full Version : java: rotation problem
DiegoFloor 10202005, 08:56 PM hi all :) i was doing this program to test a few equations i deducted of projection, rotation etc.. but the rotation came with some strange effects. if i rotate, lets say, a point around a pivot, it tends towards the pivot. if its a line, it gets smaller. if its a cube it gets deformed. very weid... looks like i'm loosing information somewhere.
I'll come back here to post the equations


DiegoFloor
10202005, 09:08 PM
oooki donki:
x = (xxo) cos(a)  (yyo) sin(a) + xo
y = (yyo) cos(a) + (xxo) sin(a) + yo
for two dimensions, where (xo,yo) is the pivot of the rotation (a point on this case) and 'a' the angle of rotation.
i even tried using some of those other types of variables, with more information and stuff. tried also using a precalculated angle, so the cos and sin functions arent the problem..
any clues? :shrug:
pekko
10242005, 10:50 AM
Are you using floating point variables instead of integers? You should...
CGTalk Moderation
10242005, 10:50 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©20002014, Jelsoft Enterprises Ltd.