07-10-2024, 09:39 AM
Just This Is My hardest Topic For Learning 3D World Of SB The Coordinates X,Y,Z In The 3D World I Got The Image From Litdev's Give Link About WPF 3D World.
How Easy 2D World Was Only Two Coordinates X,Y We Could Draw Shapes So Easily.
But 3D World Is Really Hard For Beginners Like Me
So I Gone To ChatGPT For Some Understanding.
[*]2D Coordinate System:
I Tested Looked Like A 2D Right Angle Triangle.
Added Following Code Segment From Litdev Sample For Rotating Camera.
The Final Code:
Import ID : ZBQM826.000
Now I Am Having Fun By Changing X Y Z Point's In Code.
How Easy 2D World Was Only Two Coordinates X,Y We Could Draw Shapes So Easily.
But 3D World Is Really Hard For Beginners Like Me

So I Gone To ChatGPT For Some Understanding.
[*]2D Coordinate System:
- Origin: Located at the upper-left corner of the rendering area (typically the screen).
- Axes Orientation:
- X-axis: Positive values extend to the right.
- Y-axis: Positive values extend downward.
- X-axis: Positive values extend to the right.
- Origin: Located at the center of the rendering area.
- Axes Orientation:
- X-axis: Positive values extend to the right.
- Y-axis: Positive values extend upward.
- Z-axis: Positive values extend outward from the origin, towards the viewer.
- X-axis: Positive values extend to the right.
Code:
GraphicsWindow.BackgroundColor = "LightBlue"
view = LD3DView.AddView(GraphicsWindow.Width,GraphicsWindow.Height,"True")
Point_A = "0 0 0"
Point_B = "2 0 0"
Point_C = "2 3 0"
Point_D = "0 3 0"
all = Point_A + ":" + Point_B + ":" + Point_C + ":" + Point_D
obj = LD3DView.AddGeometry(view,all,"","","Red","E")
Added Following Code Segment From Litdev Sample For Rotating Camera.
The Final Code:
Code:
GraphicsWindow.BackgroundColor = "LightBlue"
view = LD3DView.AddView(GraphicsWindow.Width,GraphicsWindow.Height,"True")
Point_A = "0 0 0"
Point_B = "2 0 0"
Point_C = "2 3 0"
Point_D = "0 3 0"
all = Point_A + ":" + Point_B + ":" + Point_C + ":" + Point_D
obj = LD3DView.AddGeometry(view,all,"","","Red","E")
While ("True")
'Use the keys to move the camera
yaw = 0
pitch = 0
roll = 0
move = 0
If (LDUtilities.KeyDown("Left")) Then
yaw = yaw-1
EndIf
If (LDUtilities.KeyDown("Right")) Then
yaw = yaw+1
EndIf
If (LDUtilities.KeyDown("Up")) Then
pitch = pitch-1
EndIf
If (LDUtilities.KeyDown("Down")) Then
pitch = pitch+1
EndIf
If (LDUtilities.KeyDown("A")) Then
roll = roll+1
EndIf
If (LDUtilities.KeyDown("D")) Then
roll = roll-1
EndIf
If (LDUtilities.KeyDown("W")) Then
move = move+1
EndIf
If (LDUtilities.KeyDown("S")) Then
move = move-1
EndIf
LD3DView.MoveCamera(view,yaw,pitch,roll,move) 'These are relative changes wrt current view
Program.Delay(10)
EndWhile
Now I Am Having Fun By Changing X Y Z Point's In Code.

ZS