3D Rotation Points 
Author Message
 3D Rotation Points

Does anyone have a cube or something similar in X,Y,Z rotation in QB45?

-=User=- [Bryan Wilson]
-=BBS=- [+64-3-479-2380]

-=Fidonet=- [3:770/525]
-=Voice=- [+64-3-487-6748]



Fri, 26 Jun 1998 03:00:00 GMT  
 3D Rotation Points

Quote:
(Bryan Wilson) writes:
>Does anyone have a cube or something similar in X,Y,Z rotation in QB45?

The following is from qb4.5 examples. No rotation points but interesting
in its simplicity.
------------------------------------cut-----------------------------------
-----------

'this program comes with microsoft quick basic 4.5
' The macro string to draw the cube and paint its sides:
Plot$ = "BR30 BU25 C1 R54 U45 L54 D45 BE20 P1,1 G20 C2 G20" + "R54 E20 L54
BD5 P2,2 U5 C4 G20 U45 E20 D45 BL5 P4,4"
'         ^---------------------------------------------^ see draw command
APage% = 1      ' Initialize values for the active and visual
VPage% = 0      ' pages, as well as the angle of rotation.
Angle% = 0

DO

   ' Draw to the active page while showing
   ' the visual page:
   SCREEN 9, , APage%, VPage%
   CLS 1

   ' Rotate the cube "Angle%" degrees:
   DRAW "TA" + STR$(Angle%) + Plot$

   ' Angle% is some multiple of 15 degrees:
   Angle% = (Angle% + 15) MOD 360

   ' Switch the active and visual pages:
   SWAP APage%, VPage%

LOOP WHILE INKEY$ = ""     ' A key press ends the program.

END



Mon, 29 Jun 1998 03:00:00 GMT  
 3D Rotation Points

Quote:

>Does anyone have a cube or something similar in X,Y,Z rotation in QB45?
>-=User=- [Bryan Wilson]
>-=BBS=- [+64-3-479-2380]

>-=Fidonet=- [3:770/525]
>-=Voice=- [+64-3-487-6748]

Try this small program.  I didn't write the original, but I did do
some modifications.  Doesn't do much but it's very educational in 3D
space.  Enjoy.

                            /~~~\              Have a
                           |\___/|              nice
                           |_| |_|              day!
                     !___!_\ ... /_!___!
                     |      |   |      |
                     |=1=   |   |      |
                      \___|/|   |\|___/
                          | |_|_| |             ____
                          |/ ^ ^ \|             #One



Mon, 29 Jun 1998 03:00:00 GMT  
 3D Rotation Points
begin 644 3d.bas
<uuencoded_portion_removed>
end


Mon, 29 Jun 1998 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. 3D Camera rotation around any object in 3D space

2. 3d rotation's

3. 3D rotation

4. 3D rotations...

5. 3D Rotation on z-axis...problem....

6. Problem with 3d camera view rotation...

7. 3D rotations and graphs

8. Rotation around an arbitrary point

9. Graph VBX that plots 3D points?

10. Is there a VBX to plot 3D points?

11. Graph VBX that plots points in 3D?

12. Points in 3D space

 

 
Powered by phpBB® Forum Software