Rotate the graph
ZXNet echo conference «code.zx»
From Evgeny Goljakov → To All 14 April 2004
Quito wanted to rotate the square?
Better yet, look for FAQ demo.design ;)) (sorry for the spelling)
Forwarded by Evgeny Goljakov
Orig.Area: RU.ALGORITHMS Mon 5 Apr 01
Orig.From: Dmitriy Yaroshevich (2:4635/1024.312)
Orig.To : Anton Zimin (2:5027/12.4)
Orig.Subj: Rotate the graph
═══ CUT ═══
Hi Anton!
Wednesday March 31, 2004, Anton Zimin wrote to All:
AZ> In short, the task...
AZ> I draw such a graph on my computer - square and with a bunch of slides.
AZ> But not in
AZ> this
AZ> problem.
AZ> Then I rotate it to isometric and demetric.
AZ> And now the result needs to be rotated around the X, Y, Z axes.
AZ> Question - how to do this?
The simplest dumbest example.
Procedure Rotate(var x,y,z:integer;xy,xz,yz:single);
var x1,y1,z1:single;
begin
x1:=x*sin(xy)+y*cos(xy);
y1:=-x*cos(xy)+y*sin(xy);
x:=trunc(z*sin(xz)+x1*cos(xz));
z1:=-z*cos(xz)+x1*sin(xz);
y:=trunc(z1*sin(yz)+y1*cos(yz));
z:=trunc(-z1*cos(yz)+y1*sin(yz));
end;
All the best to you, Anton!
Dmitriy
-+- GoldED+/W32 1.1.4.7
+ Origin: (2:4635/1024.312)
═══ END ═══
Thank you for your attention.