0

Below is the screenshot of the 3d object. This is a 3D Radar Chart where the depth is a time. As you see labels are spinning in 3d also, is there a way to determine just X and Y positions by looking up at X, Y, and Z so that I can just display those labels as flat 2D labels that are not spinning but moving along with the 3D object.

To produce that diagram I'm using Processing and Processing.js which is plain Java and because I'm using JS I have limitation to add any additional libraries.

enter image description here

Maksim
  • 16,635
  • 27
  • 94
  • 135
  • What you want is to do an Orthographic projection? http://en.wikipedia.org/wiki/Orthographic_projection – Evans May 22 '13 at 16:08

1 Answers1

0

To achieve what you want you need to obtain the model-view-projection matrix from your PGraphics object (i.e. projmodelview field in PGraphicsOpenGL) and, assuming you have your X-Y-Z coordinates as a PVector, multiply it with your matrix to obtain a vector whose X and Y coordinates are on the screen.

You can then use those coordinates to draw your labels on your canvas.

Ștefan
  • 728
  • 5
  • 7