![]() S.data.y = matrix(vertex_new(facelist1,2),size(facelist1,1),length(vertex_new(facelist1,1))/size(facelist1,1))' + y(i) S.data.x = matrix(vertex_new(facelist1,1),size(facelist1,1),length(vertex_new(facelist1,1))/size(facelist1,1))' + x(i) #Scilab animation Patch#modification of the patch on the figure Realtimeinit(frame_duration) //fix (if possible, regarding to calculus) the duration of one frameįor i = 1:size(t,2)-1 //due to the the "diff" computing Winnum=winsid() //getting the window number Title("Animation et rotation d''un patch 3d.","fontsize",3) Set(gca(),"grid",) //put the grid on the figure Show_window(curFig) //raise the graphic window T=linspace(theta_view,theta_end_view, size(t,2)-1) ĭrawlater() // delay the plotting until drawnow() is called Set the evolution of the view angles Theta and Alpha Psi_v = *2 // roll is acting about the longitudinal axis Theta_v = - theta_v + %pi/2 //A rotation axis yaw : The yaw is about the vertical body axis, #Scilab animation drivers#ATI Card With free drivers or ATI-drivers with version 0 or 0)*2) -1). This component uses some high level OpenGL primitives which are not correctly supported on some platforms (depending on the operating system, video cards, drivers. Scilab uses a "GLJPanel" %F (a Swing OpenGL component) to display graphics (plot3d, plot. #Scilab animation plus#Tapez "help usecanvas" pour plus d'information ATTENTION : A cause des limitations de votre configuration, Scilab est passé dans un mode dans lequel mélanger des uicontrols et des graphique n'est pas possible. usecanvas(%F) si la carte graphique supporte et en met pas le warning curAxes.data_bounds= //fix the boundsĬurAxes.children(1).data = ' Īnimation de notre vaisseau avec scilab et création d’un GIF animé Realtimeinit(0.1) //sets time unit to half a second Title("Trajectoire et Attitude du vaisseau","fontsize",3) Patch=curAxe.children(1) //last plot = first children = patch Psi = psi_v(i) //no roll, but we can simulate it Patch.hiddencolor=7 //define the color of the patch lor_mode=1 //define the color of the patch Patch.foreground=1 ////define the color of the lines Patch.thickness=0.5 //define the thickness of the lines line.line_style=3 //define the line style Patch=curAxe.children(1) //first plot = patch Line.foreground=16 //define the color of the line Line.thickness=2 //define the thickness of the line Line.line_style=3 //define the line style Line=curAxe.children(2) //second plot = curve Plot3d(xvf,yvf,zvf,alpha_view,theta_view,flag=) Zvf = matrix(vertex_new(facelist1,3),size(facelist1,1),length(vertex_new(facelist1,1))/size(facelist1,1))' ĬurAxe.data_bounds= Yvf = matrix(vertex_new(facelist1,2),size(facelist1,1),length(vertex_new(facelist1,1))/size(facelist1,1))' Xvf = matrix(vertex_new(facelist1,1),size(facelist1,1),length(vertex_new(facelist1,1))/size(facelist1,1))' Psi = psi_v(1) //roulis autour de l'axe nez-queue = roll Phi = phi_v(1) //piqué rotation autour de X aile de l avion = pitch Theta =theta_v(1) //tangage autour de l'axe vertical Y = yaw some adjustments due to blender and scilab Theta_v = - theta_v + %pi/2 //A rotation axis yaw the next line computes theta_v according to y > 0 or 0)*2) -1). orienting the patch on the curve (tangent) Zvf = matrix(vertices1(facelist1,3),size(facelist1,1),length(vertices1(facelist1,1))/size(facelist1,1))' Yvf = matrix(vertices1(facelist1,2),size(facelist1,1),length(vertices1(facelist1,1))/size(facelist1,1))' Xvf = matrix(vertices1(facelist1,1),size(facelist1,1),length(vertices1(facelist1,1))/size(facelist1,1))' The formula used to translate the vertex / face representation into x, y, z lists some scaling to adjust the size of the patch to the model The face list indicates which points are composing the patch. the face numbering starts à 1 (not 0 given by lib3ds) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |