Discussion forum about PANORAMIC language

Mac, Windows & Android application development with PANORAMIC language
HomeFAQSearchRegisterMemberlistUsergroupsLog in
Latest topics
» Hello world.
by Wed May 09, 2018 11:53 pm

» Biomorphes de PICKOVER
by Sun Jun 18, 2017 2:33 am

» In less than 10 lines of code
by Fri Jun 16, 2017 5:03 am

» Effect Dopler
by Fri Jun 16, 2017 3:29 am

» SuperEllipse
by Wed Jun 14, 2017 4:01 am

» Plants
by Wed Jun 14, 2017 3:38 am

» Mira's attractor
by Wed Jun 14, 2017 3:30 am

» Triangle of Sierpinski
by Wed Jun 14, 2017 3:22 am

» Esthétique polaire
by Wed Jun 14, 2017 3:16 am

» Butterfly effect : Lorenz equations
by Wed Jun 14, 2017 3:08 am

» Collision detection
by Tue Jun 13, 2017 5:09 am

» The Bees Laline Paull Epub Books
by Mon Oct 10, 2016 8:58 pm

» PANORAMIC for Mac OSX 10 is available
by Tue Aug 09, 2016 6:08 pm

» ide
by Sat Jul 16, 2016 12:27 am

» Can I change the program icon/logo in my application ?
by Thu Jul 07, 2016 3:32 am


Share | 

 Snapshot : PANORAMIC V 0.9.25i2

Go down 

Number of posts : 98
Registration date : 2007-07-01

PostSubject: Snapshot : PANORAMIC V 0.9.25i2   Fri Apr 26, 2013 8:27 pm

Snapshot : PANORAMIC V 0.9.25i2

A new snapshot is available and can be downloaded :
Download snapshot

New features:

- commands for camera:
CAM_PITCH A : rotates the camera around its X-axis by the angle A (degrees).
CAM_TURN A : rotates the camera around its Y-axis by the angle A (degrees).
CAM_ROLL A : rotates the camera around its Z-axis by the angle A (degrees).
CAM_MOVE D : moves the camera by the distance D in its pointing direction
POINT_OBJECT N : the camera points the 3D object number N
Back to top Go down
View user profile http://panoramic.forumotion.com

Number of posts : 15
Registration date : 2013-03-12

PostSubject: Re: Snapshot : PANORAMIC V 0.9.25i2   Tue Apr 30, 2013 12:23 pm

English users, please show use you know writting some cool things. Your forum is too quiet, these new function are great.
This is a little example from Jack to drive a red cube followed by the camera. This example are not using the new funtions and can be run from Panoramic version V 0.9.10 (june 2008) but it easy to test the new function with a few lines
Quote :
' =======================================================
' tutorial :  drive a red cube followed by the camera
' =======================================================
' scenario:
' 1 - a vehicule (red cube) is staying on a grid pattern (grownd)
' 2 - camera with set behind the vehicule
' 3 - the vehicule become drivable with the arrows keys and the
'      camera follow the vehicule with some inertie
' ========================================================

' variables to draw the grid
dim maxi,nb_case,taille_case,i

' variables to set vehicule and camera
dim vehicx,vehicy,vehicz
dim cam_posx,cam_posy,cam_posz
dim posx_camera_cible,posy_camera_cible,posz_camera_cible
dim deltax,deltay,deltaz,p

' variables to drive the vehicule and camera
dim vitesse,direction,angle

 ' label for the game loop
label loop

' max size of the grid

' number of cases on X or Y

' size of a case

' univers 3D creation
full_space 0:scene3D 1:full_space 1:color 1,0,0,0

' ========================================================
' grid drawig on plan XZ for showing "ground" (horizontal plan)
' The plans XY et YZ are verticals plans
' ========================================================

' Drawing X axe prallel lines
for i=0 to nb_case
    3d_line i+3,                  0, 0, i*taille_case
    3d_line i+3, nb_case*taille_case, 0, i*taille_case
    3d_line_width i+3,3
    3d_color i+3,255,255,0
next i

' Drawing Z axe prallel lines
for i=0 to nb_case
    3d_line i+nb_case+4, i*taille_case, 0, 0
    3d_line i+nb_case+4, i*taille_case, 0, nb_case*taille_case
    3d_line_width i+nb_case+4,3
    3d_color i+nb_case+4,255,255,0
next i

' creation of the vehicule
3d_cube 1,8:3d_color 1,255,0,0

' initial position of the vehicule
3d_x_position 1,vehicx
3d_y_position 1,vehicy
3d_z_position 1,vehicz

' creation of initial du starting count
3d_text 2,"9"
3d_y_rotate 2,180
3d_scale 2,4,4,4
3d_color 2,50,50,255

' initial position of the counting
3d_x_position 2,vehicx
3d_y_position 2,vehicy+5
3d_z_position 2,vehicz-5

' initial position of the camera
cam_position cam_posx, cam_posy, cam_posz

' initial position of the light
light_position vehicx, vehicy-20, vehicz-20

' ===================================================
' technique de lissage de mouvement: "camera follow"
' sur 80 trames, la caméra se positionne "doucement"
' derrière le véhicule (cube rouge)
' ===================================================

' la caméra va pointer en permanence sur le véhicule
point_position vehicx, vehicy, vehicz

' point à atteindre par la caméra
posy_camera_cible=vehicy+5:  '  5  = un peu au dessus
posz_camera_cible=vehicz-15: ' -15 = derrière

' vitesse de lissage

for i=1 to 80
 ' delta=cible-actuel
 ' actuel=actuel+delta*p
 cam_position cam_posx, cam_posy, cam_posz
 3d_text_change 2,str$(8-i/10)
 wait 50
next i

3d_text_change 2,"GO"
caption 0,"*** Arrêt par la touche ESPACE ***"
wait 500:3d_delete 2

' ========================================================================
' pilotage en douceur du véhicule:
' la flèche du haut agit sur la vitesse et non sur la position.
' c'est la pédale d'accélérateur
' la flèche du bas est la pédale de frein
' il y a des frottements: si on lache l'accélérateur, le véhicule ralentit.
' la caméra suit le véhicule avec une inertie, comme si elle était attachée
' au véhicule par un élastique: c'est encore la technique "camera follow".
' ========================================================================


' vitesse de lissage

 if scancode=38:' flèche haute

 if scancode=40:' flèche basse

 if scancode=39:' flèche droite
  3d_y_rotate 1,direction

 if scancode=37:' flèche gauche
  3d_y_rotate 1,direction

 if scancode=32 then terminate:' espace

 ' déplacement du véhicule
 3d_move 1,vitesse
 ' ==========================================
 ' ici, il n'y a plus que 2 dimensions X et Z
 ' car on se déplace dans le plan XZ
 ' on ne calcule donc plus les positions sur Y
  ' ==========================================
 ' point à atteindre par la caméra
 ' delta=cible-actuel
 ' actuel=actuel+delta*p
 cam_x_position cam_posx
 cam_z_position cam_posz
 point_x_position o3d_x_position(1)
 point_z_position o3d_z_position(1)

 ' simulation d'une friction: la vitesse diminue
 if vitesse<0 then vitesse=0

 wait 100
goto loop
Back to top Go down
View user profile
Snapshot : PANORAMIC V 0.9.25i2
Back to top 
Page 1 of 1
 Similar topics
» MH Forum Help - How to take a "snapshot" or "screen shot"
» Root Kit....Zero Access

Permissions in this forum:You cannot reply to topics in this forum
Discussion forum about PANORAMIC language :: Panoramic for Windows :: What is coocking-
Jump to: