Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to draw 3D graphics (no shading) on GLCD using microcontroller?

Status
Not open for further replies.

matrixofdynamism

Advanced Member level 2
Joined
Apr 17, 2011
Messages
593
Helped
24
Reputation
48
Reaction score
23
Trophy points
1,298
Activity points
7,681
3D graphics are based on point from which lines are made and then surfaces are where these lines form closed loop, these surfaces can then be shaded depending on the user perspective.

I am aware that OpenGL is the goto place for a complete 3D solution. However, I want to write a simpler program that can draw and rotate simpler shapes on a graphic LCD and rotate and shift them. Shadding is not required. These would be 3D polygons with may be a dozen or two points.

What resource can give me the information I need to understand how to achieve this?

The specification for the microcontroller is not important at this stage, nor is the GLCD resolution. I need to understand the theory first.
 

  • Define 3D points {x,y,z} and lines between them.
  • Convert to polar coordinate system, r, theta, phi
  • adjust scale of r. and reference offset in same coordinates as user input, to change point of view and object centre using polar coordinates.
  • Convert back to 2D and display all points and lines.
  • To convert from Polar Coordinates (r,θ) to Cartesian Coordinates (x,y) :

    • x = r × cos( θ )*cos(phi)
    • y = r × sin( θ )*sin((phi)
    • theta and phi are elevation and rotation angles.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top