Three-D Plot Demo
This is a simple demo of the raw methodology involved in the basics of plotting 3D points on a 2D monitor screen.
All this simple program does is compute the image of a cube one point at a time with a circle drawn on the front face.
Anyone who wants to learn the elementary math involved in plotting a point in 3D space onto a 2D monitor can study the source and experiment with various viewpoint settings in the interface to see how they interrelate and effect things.
Each of the X,Y,Z axes are color coded as RGB respectively help to keep track of the image orientation.
Many comments in the code explain what each part does.
Original Author: Jay Tanner
Inputs
There are only four input parameters.
The direction of view.
The angle of view from above relative to the horizon.
The size or image scale factor.
The perspective factor.
Assumptions
A basic understanding of the sine and cosine used in elementary trigonometry would be helpful, but is not mandatory. It would make the formulas used more meaningful.
Returns
The program simply demonstrates the mathematical concept behind plotting 3D images on a computer monitor, so the user can study the mathematical concept behind it.
It is done from scratch from direct computation using only VB 6 and the built in sine and cosine functions and native graphics methods.
It was written is a way that was intended to be simple to read.
(Don't know if this source code will work with VB5, but the formulas used certainly will).
Side Effects
No errors are specifically tested for, so entering extremely abnormal arguments may possibly crash the program. Only single precision values are used for the graphics plotting.
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 111 times
Categories
Attachments
CODE_UPLOAD143011302001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 15,612 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.