• Advertisement
Sign in to follow this  

tiny 2D and/or 3d Engine

This topic is 3386 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm an system engineering student, and I'm developening a small embedded device which is based on a microcontroller (8 or 16/32bits MCU, I'm using now a 8bit but can migrate to a bigger one), and a 2.8" LCD. I have all the low level rutines of the LCD (init, set address in the LCD memory map, and write a pixel) and also I've developed some functions like drawing lines, rectangles, triangles and circles, and more advances rutines like fill circle and triangle. Eventhough I did this, I'm not an expert, and I need some information on how to do a more complete 2D (and may be 3D) little engine for my application. I'm programming it in C. It will be great if I can draw triangles and rotate them, or make a zoom in/out, or even draw a 3D object and rotate it or translate it. does anybody knows a 2D/3D engine little enough to be on a small cpu? or something that can be useful for me? Thanks very much, Ezequiel

Share this post


Link to post
Share on other sites
Advertisement
Hi,
Before we had full fledged graphics API, there was other means to realize 3D drawing applications. These means revoveld around the use of:

- fixed point math :www.flipcode.com/archives/3D_Graphics_on_Mobile_Devices-Part_2_Fixed_Point_Math.shtml

- precomputed sine and cosine tables

- theorem of Thales: your need to define the near plane and the distance of the viewer from the near plane. You project each vertex onto the near plane using the theorem of Thales and then draw lines between each pair of vertices. The size of the near plane is the resolution of your screen.
pagesperso-orange.fr/stefbase/maths/geometrie/Thales.htm(in french since I do not know how this theorem is called in english).

Hope that helps.
Ghostly yours,
Red.

Share this post


Link to post
Share on other sites
Quote:
Original post by ezequielaceto
does anybody knows a 2D/3D engine little enough to be on a small cpu? or something that can be useful for me?


libXMI would give you a set of 2D functions in C that you may or may not be able to compile to your device.

Are you looking for a drop-in library, source to compile, or just an API to use as a basis for your own implementation?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement