3D calculations
- To: mathgroup at smc.vnet.net
- Subject: [mg2592] 3D calculations
- From: masa at maskos.pp.fi (Matti Koskimies)
- Date: Mon, 27 Nov 1995 21:32:56 -0500
Hi all! I have some problems in programming a 3d cube (don't get mad -this is pure math question). The problem is in swithing 3D polar koordinates to 2D rectangular koordinates. I use two degrees: first from Yaxis to Zaxis and another from X to Z (and radius is 50). I think that this system should work with one point: x=rad*sin(yz)*cos(yz) y=rad*sin(yz)*sin(yz) Let's say that this point is the right upper corner of the cube (the one nearest one): now I can have all upper points if I make a 4 step loop and always add 90 gedrees to the xz value. but here is the broplem: what do I have do if the cube is turned for example so that the uppest plane points 80 degrees to right? Thanks for replying!!! (I'd be really happy if you used e-mail...) Matti Koskimies