![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programming Guru
![]() |
I'll be doing it in Turing anyways (for school).
And I don't think using a 3d graphics library would teach me HOW it works or the vector algebra directly behind it. It would probably only teach me the obvious, besides examples of how I could layout the user-accessable side of the module. |
|
|
|
|
|
#12 |
|
Programming Guru
![]() |
I've tried google, without much success (mostly links to OpenGL stuff). Have any links to the actual math behind 3 dimensions?
|
|
|
|
|
|
#13 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
It is mostly linear algebra and analytic geometry.
Nate Robins' demo proggys shed quite a bit of light on the behavior (sometimes it gets confusing with shading, light position, *perspectives*, etc. etc. in OpenGL) of objects and environment in OpenGL
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty Last edited by stevengs; Oct 13th, 2005 at 10:12 AM. |
|
|
|
|
|
#14 |
|
Programming Guru
![]() |
YESSSS I DID IT!
var vectors : array 1 .. 8 of array 1 .. 3 of int
vectors (1) (1) := - 20
vectors (1) (2) := - 20
vectors (1) (3) := - 20
vectors (2) (1) := 20
vectors (2) (2) := - 20
vectors (2) (3) := - 20
vectors (3) (1) := - 20
vectors (3) (2) := 20
vectors (3) (3) := - 20
vectors (4) (1) := 20
vectors (4) (2) := 20
vectors (4) (3) := - 20
vectors (5) (1) := - 20
vectors (5) (2) := - 20
vectors (5) (3) := 20
vectors (6) (1) := 20
vectors (6) (2) := - 20
vectors (6) (3) := 20
vectors (7) (1) := - 20
vectors (7) (2) := 20
vectors (7) (3) := 20
vectors (8) (1) := 20
vectors (8) (2) := 20
vectors (8) (3) := 20
procedure draw_object (vectors : array 1 .. 8 of array 1 .. 3 of int, x, y,
povX, povY : int, z : real)
var vecX, vecY, xAng, yAng : int
for point : 1 .. 8
vecX := x + round (vectors (point) (1) * z)
vecY := y + round (vectors (point) (2) * z)
xAng := round ( (povX - vecX) / (vectors (point) (3) / z))
yAng := round ( (povY - vecY) / (vectors (point) (3) / z))
drawdot (vecX + xAng, vecY + yAng, 7)
end for
end draw_object
for i : 1 .. 50
cls
draw_object (vectors, 100 + (i * 7), maxy div 2, maxx div 2, maxy div 2,
i / 25 + 1)
delay (100)
end forThat draws a cube getting closer to the screen while scrolling from left to right. The function is called with a point of view, and an x, y, z offset. Then it takes the vector points of the cube and draws it three dimensionally. I did it without any learning resources as well! ![]() |
|
|
|
|
|
#15 |
|
Newbie
Join Date: Oct 2005
Posts: 12
Rep Power: 0
![]() |
ok now make it rotate lol
|
|
|
|
|
|
#16 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
yeah, some juicy model transformations (lotsa matrices).
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#17 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
some juicy model transformations (lotsa matrices).
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#18 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
double post
![]() |
|
|
|
|
|
#19 |
|
Programming Guru
![]() ![]() ![]() |
impressive
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#20 |
|
Programming Guru
![]() |
"now make it rotate"
I already did. Check my function description. The xPov will rotate it on the x-axis. The yPov will rotate it on the y-axis dependant on where the x and y was passed in relation to those points-of view. Then the z will change the distance from the screen, and x and y where it actually is on the screen. I think it's pretty much flawless as well. Only like 10 lines too. Now I just need a 3d model to extract the pixel data from to test it on. ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|