Sub Project_17_EN(ByVal VecType, m, n, m1, n1 As Integer) ' 17_3D Model_EN ' Updated: 29/03/24 ' Created by: Ariel R. Becerra (21/11/23) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 17 in the name of this function must match the one in the list of the CONFIG sheet for this project. If not, please correct it. ' Note 2: This code will be integrated into the main code to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns from INICIO to the right in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet and add a short name and the number of your new project to the last row in the projects list. ' Step 2. Make sure that the list of projects in CONFIG sheet has the correct ascending numbering. ' Step 4. Open the VBA editor (Alt + F11 in Windows or Fn + Option + F11 in macOS). To avoid mistakes, make sure you only have one workbook open. ' Step 5. On the left, in the project explorer, select a non full module (or add a new one). ' Step 6. Select all the code in this file, copy and paste it at the end of the existing code in the module (or in the new one). ' Step 7. To load the project and to check it in a new sheet, go to the CONFIG sheet and click the New Sheet button, then select the project from the list and click the +Vector button. ' Step 8. Click any XYZ button to get the project in the coordinate system. Enjoy it! ' Visit www.sciensolar.com for news and updates of ? ScienSolar. Cells(m1 - 1, n1 + 2).FormulaR1C1 = "1" Cells(m1 + 0, n1 + 2).FormulaR1C1 = "=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 = "850" Cells(m1 + 0, n1 + 6).FormulaR1C1 = "=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 = "0.1" Cells(m1 + 0, n1 + 8).FormulaR1C1 = "Ariel R. Becerra (21/11/23)" Cells(m1 + 1, n1 + 2).FormulaR1C1 = "=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 = "400" Cells(m1 + 1, n1 + 4).FormulaR1C1 = "=CONFIG!R4C6" Cells(m1 + 1, n1 + 5).FormulaR1C1 = "0" Cells(m1 + 1, n1 + 6).FormulaR1C1 = "=CONFIG!R4C8" Cells(m1 + 1, n1 + 7).FormulaR1C1 = "39" Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "20" Cells(m1 + 2, n1 + 4).FormulaR1C1 = "=CONFIG!R5C6" Cells(m1 + 2, n1 + 5).FormulaR1C1 = "15" Cells(m1 + 2, n1 + 6).FormulaR1C1 = " t =" Cells(m1 + 2, n1 + 7).FormulaR1C1 = "0" Cells(m1 + 3, n1 + 0).FormulaR1C1 = "r" Cells(m1 + 3, n1 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "200" Cells(m1 + 3, n1 + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m1 + 3, n1 + 5).FormulaR1C1 = "15" Cells(m1, n1 + 9).FormulaR1C1 = "HELP" Dim HELPtxt As String HELPtxt = "MOVIMIENTO PARAB" & ChrW(211) & "LICO" & Chr(10) & _ " (See english version at the end)" & Chr(10) & _ " A continuaci" & ChrW(243) & "n se escriben en las respectivas celdas las ecuaciones del movimiento parab" & ChrW(243) & "lico para las coordenadas x, y, z, que corresponden al vector r(x, y, z):" & Chr(10) & _ " A12 = x = x0 + v0x t + 1/2 ax t^2" & ChrW(233) & "" & Chr(10) & _ " B12 = y = y0 + v0y t + 1/2 ay t^2 " & Chr(10) & _ " C12 = z = z0 + v0z t + 1/2 az t^2," & ChrW(233) & "" & Chr(10) & _ " en donde el tiempo est" & ChrW(233) & " dado por el valor de la celda I5. Las aceleraciones en cada eje se calculan por la segunda ley de Newton F = ma = qE. En el vector 6 se encuentran las ecuaciones para las respectivas componentes de estas aceleraciones: " & ChrW(233) & "" & Chr(10) & _ " A57 = ax = q Ex /m" & ChrW(233) & "" & Chr(10) & _ " B57 = ay = q Ey /m" & ChrW(233) & "" & Chr(10) & _ " C57 =az = q Ez /m." & Chr(10) & _ " Las ecuaciones para las componentes del vector velocidad se calculan por las f" & ChrW(243) & "rmulas A39 = Vx = Vox + ax t, B39 = Vy = Voy + ay t, C39 = Vz = Voz + az t. El tiempo tR en el que la part" & ChrW(237) & "cula alcanza el plano xy y es hallado resoviendo la ecuaci" & ChrW(243) & "n cuadr" & ChrW(225) & "tica descrita al principio con respecto al tiempo t y para cada eje el resultado es plasmado en A56, B56 y C56. Por medio de la funci" & ChrW(243) & "n MIN() de Excel, es calculado el tiempo m" & ChrW(237) & "nimo entre los tres planos con el objeto de identificar a cu" & ChrW(225) & "l plano cae primero la part" & ChrW(237) & "cula; este tiempo m" & ChrW(237) & "nimo se plasma en G49." & Chr(10) & _ " Oprima el bot" & ChrW(243) & "n B/W para ver el modelo en fondo blanco. Cambie los colores de los vectores a su gusto. En las celdas G12-G26 modifique los par" & ChrW(225) & "metros iniciales para la posici" & ChrW(243) & "n, velocidad, campo el" & ChrW(233) & "ctrico, carga y masa de la part" & ChrW(237) & "cula y observe los resultados oprimiendo el bot" & ChrW(243) & "n Run. Si desea dibujar la trayectoria de la part" & ChrW(237) & "cula, coloque G28=2, y para quitarla G28=1, oprimiendo luego el bot" & ChrW(243) & "n Run. Oprima el bot" & ChrW(243) & "n Set to Zero para volver a iniciar la simulaci" & ChrW(243) & "n, y el bot" & ChrW(243) & "n 1 by 1 para ver la simulaci" & ChrW(243) & "n cada paso." & ChrW(233) & "" & Chr(10) & _ " (ENGLISH)" & Chr(10) & _ " PARABOLIC MOVEMENT" & Chr(10) & _ " Next, the equations of parabolic motion are written in the respective cells for the coordinates x, y, z, which correspond to the vector r(x, y, z):" & Chr(10) & _ " A12 = x = x0 + v0x t + 1/2 ax t^2" & Chr(10) & _ " B12 = y = y0 + v0y t + 1/2 ay t^2 " & Chr(10) & _ " C12 = z = z0 + v0z t + 1/2 az t^2," & Chr(10) & _ " where the time is given by the value of cell I5. The accelerations in each axis are calculated by Newton's second law F = ma = qE. In vector 6 are the equations for these accelerations:" & Chr(10) & _ " A57 = ax = q Ex /m" & Chr(10) & _ " B57 = ay = q Ey /m" & Chr(10) & _ " C57 =az = q Ez /m." & Chr(10) & _ " The equations for the components of the velocity vector are calculated using the formulas A39 = Vx = Vox + ax t, B39 = Vy = Voy + ay t, C39 = Vz = Voz + az t. The time tR in which the particle reaches the xy plane is found by solving the quadratic equation described at the beginning with respect to time t and for each axis the result is recorded in A56, B56 and C56. Using Excel's MIN() function, the minimum time between the three planes is calculated to identify which plane the particle lands on first; this minimum time is reflected in I6." & Chr(10) & _ " Press the B/W button to see the model on a white background. Change the colors of the vectors to your liking. In cells G12-G26 modify the initial parameters of position, velocity, electric field, charge and mass of the particle and observe the results by pressing the Run button. If you want to draw the trajectory of the particle, set G28 = 2, and to remove it, G28 = 1, then press the Run button. Press the Set to Zero button to restart the simulation and the 1 by 1 button to view the simulation at each step." & Chr(10) & _ " " Cells(m1, n1 + 9).Comment.Text Text:=HELPtxt If m = m1 + 0 Then ' vector 6 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "r" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "200" Cells(m + 3, n + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m + 3, n + 5).FormulaR1C1 = "15" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 2).FormulaR1C1 = "Integration of three-dimensional objects." Cells(m + 4, n + 12).FormulaR1C1 = "INTERACTION WITH 3D MODELS IMPORTED TO ScienSolar" Cells(m + 4, n + 24).FormulaR1C1 = "INSTRUCTIONS" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 6, n + -1).FormulaR1C1 = "Initial position" Cells(m + 6, n + 0).FormulaR1C1 = "Aoy" Cells(m + 6, n + 1).FormulaR1C1 = "Aoz" Cells(m + 7, n + -1).FormulaR1C1 = "=R[2]C[6]" Cells(m + 7, n + 0).FormulaR1C1 = "=R[3]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=R[4]C[4]" Cells(m + 7, n + 4).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "INITIAL POSITION:" Cells(m + 8, n + 21).FormulaR1C1 = "3D models are very useful to complement simulations of physics problems, especially for educational " Cells(m + 9, n + -1).FormulaR1C1 = "=R[4]C[6]*R[-7]C[8]+1/2*R[45]C*POWER(R[-7]C[8],2)" Cells(m + 9, n + 0).FormulaR1C1 = "=R[5]C[5]*R[-7]C[7]+1/2*R[45]C*POWER(R[-7]C[7],2)" Cells(m + 9, n + 1).FormulaR1C1 = "=R[6]C[4]*R[-7]C[6]+1/2*R[45]C*POWER(R[-7]C[6],2)" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = " x_o =" Cells(m + 9, n + 5).FormulaR1C1 = "4" Cells(m + 9, n + 21).FormulaR1C1 = "purposes. Models can be downloaded in MS Excel starting with version 2019. Excel has online libraries, from " Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = " y_o =" Cells(m + 10, n + 5).FormulaR1C1 = "0" Cells(m + 10, n + 21).FormulaR1C1 = "which they are downloaded via the Insert menu, then insert 3D model. You can also import your own models " Cells(m + 11, n + -1).FormulaR1C1 = "6" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = " z_o =" Cells(m + 11, n + 5).FormulaR1C1 = "3" Cells(m + 11, n + 21).FormulaR1C1 = "via the Insert 3D Model from File menu. The file extension must be .fbx or .glb." Cells(m + 3, n + 1).Interior.Color = "16711680" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "Cubo" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 5 Cells(m + 3, n + -1).FormulaR1C1 = "2" Cells(m + 3, n + 0).FormulaR1C1 = "Cubo" Cells(m + 3, n + 1).FormulaR1C1 = "Cubo" Cells(m + 3, n + 4).FormulaR1C1 = "INITIAL VELOCITY:" Cells(m + 3, n + 21).FormulaR1C1 = "In this simulation we will use the same equations from the PARABOLIC MOTION project, therefore we will import " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "200" Cells(m + 4, n + 4).FormulaR1C1 = " V_ox=" Cells(m + 4, n + 5).FormulaR1C1 = "0" Cells(m + 4, n + 21).FormulaR1C1 = "some parts from there and then adapt the 3D model." Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "0" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 4).FormulaR1C1 = " V_oy=" Cells(m + 5, n + 5).FormulaR1C1 = "3" Cells(m + 6, n + -1).FormulaR1C1 = "=R[-13]C[8]*250" Cells(m + 6, n + 0).FormulaR1C1 = "=R[-13]C[7]*50+90" Cells(m + 6, n + 4).FormulaR1C1 = " V_oz=" Cells(m + 6, n + 5).FormulaR1C1 = "4" Cells(m + 6, n + 21).FormulaR1C1 = "The model allows simulating the movement of a charged particle in a field of any configuration. In this case, " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C+R[-7]C[6]" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-7]C+R[-6]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-7]C+R[-5]C[4]" Cells(m + 7, n + 4).FormulaR1C1 = "FIELD:" Cells(m + 7, n + 21).FormulaR1C1 = "the movement of charged particles in an electric field will be studied, however the model can be adapted to " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = " E_x =" Cells(m + 8, n + 5).FormulaR1C1 = "0" Cells(m + 8, n + 21).FormulaR1C1 = "other types of fields, including time-varying fields." Cells(m + 9, n + -1).FormulaR1C1 = "2" Cells(m + 9, n + 0).FormulaR1C1 = "2" Cells(m + 9, n + 1).FormulaR1C1 = "0" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = " E_y =" Cells(m + 9, n + 5).FormulaR1C1 = "0" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[6]C[4]" Cells(m + 10, n + 4).FormulaR1C1 = " E_z =" Cells(m + 10, n + 5).FormulaR1C1 = "-3" Cells(m + 10, n + 21).FormulaR1C1 = "The position of the particle at any moment in time is given by the equations:" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[5]C[4]" Cells(m + 11, n + 4).FormulaR1C1 = "PARTICLE CHARGE:" Cells(m + 3, n + 1).Interior.Color = "255" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "Vo" Call AddNewVector End If ' vector ends If m = m1 + 18 Then ' vector 4 Cells(m + 3, n + -1).FormulaR1C1 = "3" Cells(m + 3, n + 0).FormulaR1C1 = "Vo" Cells(m + 3, n + 4).FormulaR1C1 = " q =" Cells(m + 3, n + 5).FormulaR1C1 = "1" Cells(m + 3, n + 27).FormulaR1C1 = "(Eq-16-1)" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "MASS OF THE PARTICLE:" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 4).FormulaR1C1 = " m =" Cells(m + 5, n + 5).FormulaR1C1 = "1" Cells(m + 6, n + 4).FormulaR1C1 = "TRAJECTORY:" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-16]C[6]" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-15]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-14]C[4]" Cells(m + 7, n + 4).FormulaR1C1 = "YES = 2, NO = 1" Cells(m + 7, n + 5).FormulaR1C1 = "1" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 8, n + 21).FormulaR1C1 = "The components of the velocity vector are defined by the equations:" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-14]C[6]" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-13]C[5]" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-12]C[4]" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "RESULTS:" Cells(m + 10, n + 27).FormulaR1C1 = "(Eq-16-2)" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 3, n + 1).Interior.Color = "11573124" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "V" Call AddNewVector End If ' vector ends If m = m1 + 27 Then ' vector 3 Cells(m + 3, n + -1).FormulaR1C1 = "4" Cells(m + 3, n + 0).FormulaR1C1 = "V" Cells(m + 3, n + 4).FormulaR1C1 = "POSITION VECTOR:" Cells(m + 3, n + 6).FormulaR1C1 = "(Eq-16-1)" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = " x =" Cells(m + 4, n + 5).FormulaR1C1 = "=R[-22]C[-6]+R[-22]C" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 4).FormulaR1C1 = " Y =" Cells(m + 5, n + 5).FormulaR1C1 = "=R[-23]C[-5]+R[-22]C" Cells(m + 6, n + 4).FormulaR1C1 = " z =" Cells(m + 6, n + 5).FormulaR1C1 = "=R[-24]C[-4]+R[-22]C" Cells(m + 6, n + 21).FormulaR1C1 = "That is, it is possible to predict the position and speed of the particle at any moment in time having the initial " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-18]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-18]C" Cells(m + 7, n + 4).FormulaR1C1 = " r. =" Cells(m + 7, n + 5).FormulaR1C1 = "=SQRT((R[-3]C-R[-25]C)^2+(R[-2]C-R[-24]C)^2+(R[-1]C-R[-23]C)^2)" Cells(m + 7, n + 21).FormulaR1C1 = "conditions such as initial position, initial speed, magnitude and direction of the field, charge and " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "VELOCITY VECTOR:" Cells(m + 8, n + 6).FormulaR1C1 = "(Eq-16-2)" Cells(m + 8, n + 21).FormulaR1C1 = "mass of the particle:" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-23]C[6]+R[18]C*R[-34]C[8]" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-22]C[5]+R[18]C*R[-34]C[7]" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-21]C[4]+R[18]C*R[-34]C[6]" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = " V_x=" Cells(m + 9, n + 5).FormulaR1C1 = "=RC[-6]" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = " V_y=" Cells(m + 10, n + 5).FormulaR1C1 = "=R[-1]C[-5]" Cells(m + 10, n + 21).FormulaR1C1 = "Initial position at x:" Cells(m + 10, n + 24).FormulaR1C1 = "G12" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = " V_z=" Cells(m + 11, n + 5).FormulaR1C1 = "=R[-2]C[-4]" Cells(m + 11, n + 21).FormulaR1C1 = "Initial position in y:" Cells(m + 11, n + 24).FormulaR1C1 = "G13" Cells(m + 3, n + 1).Interior.Color = "11573124" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "E" Call AddNewVector End If ' vector ends If m = m1 + 36 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 = "5" Cells(m + 3, n + 0).FormulaR1C1 = "E" Cells(m + 3, n + 1).FormulaR1C1 = "z" Cells(m + 3, n + 4).FormulaR1C1 = " V =" Cells(m + 3, n + 5).FormulaR1C1 = "=SQRT(R[-3]C^2+R[-2]C^2+R[-1]C^2)" Cells(m + 3, n + 21).FormulaR1C1 = "Initial position in z:" Cells(m + 3, n + 24).FormulaR1C1 = "G14" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 2).FormulaR1C1 = "<-- density of the field vectors" Cells(m + 4, n + 4).FormulaR1C1 = "ACCELERATION:" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "0.4" Cells(m + 5, n + 4).FormulaR1C1 = " a_x=" Cells(m + 5, n + 5).FormulaR1C1 = "=R[13]C[-6]" Cells(m + 5, n + 21).FormulaR1C1 = "Initial velocity at x:" Cells(m + 5, n + 24).FormulaR1C1 = "G16" Cells(m + 6, n + -1).FormulaR1C1 = "CAMPO EL" & ChrW(243) & "CTRICO" Cells(m + 6, n + 4).FormulaR1C1 = " a_y=" Cells(m + 6, n + 5).FormulaR1C1 = "=R[12]C[-5]" Cells(m + 6, n + 21).FormulaR1C1 = "Initial velocity in y:" Cells(m + 6, n + 24).FormulaR1C1 = "G17" Cells(m + 7, n + -1).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 2).FormulaR1C1 = "<-- height of the field vector." Cells(m + 7, n + 4).FormulaR1C1 = " a_z=" Cells(m + 7, n + 5).FormulaR1C1 = "=R[11]C[-4]" Cells(m + 7, n + 21).FormulaR1C1 = "Initial speed in z:" Cells(m + 7, n + 24).FormulaR1C1 = "G18" Cells(m + 8, n + -1).FormulaR1C1 = "3" Cells(m + 8, n + 0).FormulaR1C1 = "2" Cells(m + 8, n + 1).FormulaR1C1 = "0.5" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = " a =" Cells(m + 8, n + 5).FormulaR1C1 = "=SQRT(R[-3]C^2+R[-2]C^2+R[-1]C^2)" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-28]C[6]" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-27]C[5]" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-26]C[4]" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = "MAX. RANGE TIME:" Cells(m + 9, n + 21).FormulaR1C1 = "Magnitude of the field in x:" Cells(m + 9, n + 24).FormulaR1C1 = "G20" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = " t_R =" Cells(m + 10, n + 5).FormulaR1C1 = "=MIN(ABS(R[7]C[-6]),ABS(R[7]C[-5]),ABS(R[7]C[-4]))" Cells(m + 10, n + 21).FormulaR1C1 = "Magnitude of the field in x:" Cells(m + 10, n + 24).FormulaR1C1 = "G21" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "Magnitude of the field in x:" Cells(m + 11, n + 24).FormulaR1C1 = "G22" Cells(m + 3, n + 1).Interior.Color = "11573124" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "a" Call AddNewVector End If ' vector ends If m = m1 + 45 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "6" Cells(m + 3, n + 0).FormulaR1C1 = "a" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "Particle charge:" Cells(m + 4, n + 24).FormulaR1C1 = "G24" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 21).FormulaR1C1 = "Particle mass:" Cells(m + 5, n + 24).FormulaR1C1 = "G26" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-36]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-36]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-36]C" Cells(m + 7, n + 21).FormulaR1C1 = "Use the simulation run buttons to see the parabolic motion. The trajectory of the particle during its " Cells(m + 8, n + -1).FormulaR1C1 = "=IF(R[1]C=0,10000,(-R[-40]C[6]-SQRT(ABS(POWER(R[-40]C[6],2)-2*R[1]C*R[-44]C[6])))/R[1]C)" Cells(m + 8, n + 0).FormulaR1C1 = "=IF(R[1]C=0,10000,(-R[-39]C[5]-SQRT(ABS(POWER(R[-39]C[5],2)-2*R[1]C*R[-43]C[5])))/R[1]C)" Cells(m + 8, n + 1).FormulaR1C1 = "=IF(R[1]C=0,100000,(-R[-38]C[4]-SQRT(ABS(POWER(R[-38]C[4],2)-2*R[1]C*R[-42]C[4])))/R[1]C)" Cells(m + 8, n + 2).FormulaR1C1 = "<-- maximum range time t_R" Cells(m + 8, n + 21).FormulaR1C1 = "movement can be set by setting G28=2 and running the simulation with the Run button. To delete " Cells(m + 9, n + -1).FormulaR1C1 = "=R[-33]C[6]*R[-9]C/R[-31]C[6]" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-33]C[5]*R[-9]C/R[-31]C[5]" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-33]C[4]*R[-9]C/R[-31]C[4]" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 21).FormulaR1C1 = "the trajectory set G28=1 and run the simulation again." Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "3D MODEL:" Cells(m + 3, n + 1).Interior.Color = "49407" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Cells(m1 + 2, n1 - 1).Value = 6 End If ' vector ends If m = m1 + 45 Then Cells(m + 13, n + 21).FormulaR1C1 = "In the case of the 3D object that is integrated into the movement, cell B15=Cube is used here to call the object " Cells(m + 14, n + 21).FormulaR1C1 = "found in the 3Dmodels sheet. For this command to work, cell B16 must contain the number 200: B16=200. " Cells(m + 15, n + 21).FormulaR1C1 = "The size of the object is set in cell B17, set for example B17=4 and press Execute. Cells A18 and B18 are " Cells(m + 16, n + 21).FormulaR1C1 = "responsible for modifying the rotation angles of the 3D object. In this case they were made dynamic by putting " Cells(m + 17, n + 21).FormulaR1C1 = "a value linked to time (represented by cell I5), through the formulas A18=I5*250 and B18 =I5*50+90; These " Cells(m + 18, n + 21).FormulaR1C1 = "values and formulas can be customized. Note that the angle changes over time, which is why it is related to cell I5, " Cells(m + 19, n + 21).FormulaR1C1 = "only on a different scale than the time of the parabolic motion." Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub