2

I'm currently working on a game in JS using HTML5 canvas and I need to convert a 3D coordinate defined byx, y, z to 2D coordinate defined by x' and y' using two projections mode : axonometric first and then isometric.

I have already read the wiki page of isometric projection to find formula but I don't understand that :

Wikipedia formula:

enter image description here

Why it's using matrix rotation and where is the x' and y' 2D result ?

Can someone give me the formulas to convert a point of 3D axes in 2D axes using axonometric projection and the formula using isometric projection with explanation for beginner in mathematical?

Tomislav Stankovic
  • 3,090
  • 16
  • 33
  • 41
Rakim Faoui
  • 107
  • 1
  • 7

2 Answers2

1

3D to 2D isometric:

x'=(x-z)/sqrt(2)
y'=(x+2y+z)/sqrt(6)

(Based on @NicoSchertler's comment. He says he got it from Wikipedia but I don't see how..)

For other axonometric see also: Projecting 3D points to 2D plane

Yarin
  • 159,198
  • 144
  • 384
  • 498
0
x'=(x-z)/sqrt(2)
y'=(x+2y+z)/sqrt(6)

if x, y = 0 and z = 100 I get the resulting coordinate (-70, 40)..

Thus I don't think this formula is correct.. I'd post this as a comment, but the rules on this site make zero sense and don't let me.

dude
  • 1