Sub Project_10_EN(ByVal VecType, m, n, m1, n1 As Integer) ' 10_Cylindrical Coordinates_EN ' Updated: 30/01/25 ' 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 10 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 (into the VBA editor) to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet (at the end of column C) and add the number of your new project to the last row in the projects list, and a short name in the corresponding langage column. ' 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 - 1, n1).Value = "" 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 = "8" 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 = "x" Cells(m1 + 1, n1 + 5).FormulaR1C1 = "0" Cells(m1 + 1, n1 + 6).FormulaR1C1 = "=CONFIG!R4C8" Cells(m1 + 1, n1 + 7).FormulaR1C1 = "=CONFIG!R4C9" Cells(m1 + 2, n1 + 0).FormulaR1C1 = "t = 0,109375 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "60" Cells(m1 + 2, n1 + 4).FormulaR1C1 = "y" Cells(m1 + 2, n1 + 5).FormulaR1C1 = "15" Cells(m1 + 2, n1 + 6).FormulaR1C1 = "=CONFIG!R5C8" Cells(m1 + 2, n1 + 7).FormulaR1C1 = "45" Cells(m1 + 3, n1 + 0).FormulaR1C1 = "(Eq-rho)" Cells(m1 + 3, n1 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "200" Cells(m1 + 3, n1 + 4).FormulaR1C1 = "z" Cells(m1 + 3, n1 + 5).FormulaR1C1 = "15" Cells(m1, n1 + 9).FormulaR1C1 = "HELP" Dim HELPtxt As String HELPtxt = "CYLINDRICAL COORDINATES" & Chr(10) & _ " The mathematical formulas for this case are the equations:" & Chr(10) & _ " x=rho cos phi, y= rho sin phi, z=z." & Chr(10) & _ " To draw the unit vectors of the cylindrical coordinates in the Cartesians, the formulas are used:" & Chr(10) & _ " unit rho= i cos phi + j sin phi, " & Chr(10) & _ " unit phi = - i sin phi + j cos phi, " & Chr(10) & _ " unit z = k," & Chr(10) & _ " where unit designates the unit vectors. These equations for the rho unit are in cells A12, B12, C12, in A21, B21, C21 for the phi unit, and in A30, B30, C30 for z." & Chr(10) & _ " To run a simulation, enter a value for rho in cell E12=2, phi in E13=45, E14=1 (be sure that E19, E29 y E21 are clean) and then press the Run button. The angles will begin to travel in 8 steps from 45 to 360 degrees. To change the initial position of the cylindrical system, go to the parameters of vector A." & Chr(10) & _ " " & Chr(10) & _ " " & Chr(10) & _ " " On Error Resume Next Cells(m1, n1 + 9).Comment.Text Text:=HELPtxt If m = m1 + 0 Then ' vector 10 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "(Eq-rho)" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "200" Cells(m + 3, n + 4).FormulaR1C1 = "z" Cells(m + 3, n + 5).FormulaR1C1 = "15" Cells(m + 3, n + 19).FormulaR1C1 = "1" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 2).FormulaR1C1 = "Cylindrical coordinates" Cells(m + 4, n + 12).FormulaR1C1 = "CYLINDRICAL COORDINATES" Cells(m + 4, n + 24).FormulaR1C1 = "INSTRUCTIONS" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 6, n + 2).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 6, n + 4).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 7, n + -1).FormulaR1C1 = "=R[29]C+R[27]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[29]C+R[27]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[29]C+R[27]C" Cells(m + 7, n + 2).FormulaR1C1 = "TO CARTESIANS:" Cells(m + 7, n + 4).FormulaR1C1 = "RESULT:" Cells(m + 7, n + 5).FormulaR1C1 = "(Eq-9-1)" Cells(m + 7, n + 21).FormulaR1C1 = "The model allows you to visualize the unit vectors of the cylindrical coordinates represented in the " Cells(m + 8, n + 2).FormulaR1C1 = "(delete E18, E19 and GE20)" Cells(m + 8, n + 21).FormulaR1C1 = "Cartesian coordinates. Press the equation buttons to view the equations (the equations must" Cells(m + 9, n + -1).FormulaR1C1 = "=COS(RADIANS(R[24]C[3]))" Cells(m + 9, n + 0).FormulaR1C1 = "=SIN(RADIANS(R[24]C[2]))" Cells(m + 9, n + 1).FormulaR1C1 = "0" Cells(m + 9, n + 2).FormulaR1C1 = "rho =" Cells(m + 9, n + 3).FormulaR1C1 = "3" Cells(m + 9, n + 4).FormulaR1C1 = "x =" Cells(m + 9, n + 5).FormulaR1C1 = "=R[23]C[-3]*RC[-6]" Cells(m + 9, n + 21).FormulaR1C1 = "be found in the 3DModels sheet)." Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[22]C[4]" Cells(m + 10, n + 2).FormulaR1C1 = "phi =" Cells(m + 10, n + 3).FormulaR1C1 = "=R[-8]C[4]" Cells(m + 10, n + 4).FormulaR1C1 = "y =" Cells(m + 10, n + 5).FormulaR1C1 = "=R[22]C[-3]*R[-1]C[-5]" 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 + 2).FormulaR1C1 = "z=" Cells(m + 11, n + 3).FormulaR1C1 = "2" Cells(m + 11, n + 4).FormulaR1C1 = "z =" Cells(m + 11, n + 5).FormulaR1C1 = "=RC[-2]" Cells(m + 11, n + 21).FormulaR1C1 = "Different types of coordinates are used to simplify mathematical and physical problems that have a certain " Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = "(Eq-phi)" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 9 Cells(m + 3, n + -1).FormulaR1C1 = "2" Cells(m + 3, n + 0).FormulaR1C1 = "(Eq-phi)" Cells(m + 3, n + 2).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 3, n + 4).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 3, n + 21).FormulaR1C1 = "symmetry. For example, an electric field of a point charge has spherical symmetry, therefore it is more convenient " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "and simple to represent and study it from spherical coordinates, while the electric field of an infinite, charged " 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 + 2).FormulaR1C1 = "TO CYLINDRICAL" Cells(m + 5, n + 4).FormulaR1C1 = "RESULT:" Cells(m + 5, n + 5).FormulaR1C1 = "(Eq-9-2)" Cells(m + 5, n + 21).FormulaR1C1 = "straight line has cylindrical symmetry. To see examples of these two symmetries see the projects CYLINDRICAL " Cells(m + 6, n + 2).FormulaR1C1 = "(delete E12, E13 and E14)" Cells(m + 6, n + 21).FormulaR1C1 = "SYMMETRY and SPHERICAL SYMMETRY." Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 2).FormulaR1C1 = "x =" Cells(m + 7, n + 4).FormulaR1C1 = "rho =" Cells(m + 7, n + 5).FormulaR1C1 = "=IF(RC[-2]="""",R[-7]C[-2],SQRT(RC[-2]^2+R[1]C[-2]^2))" Cells(m + 8, n + 2).FormulaR1C1 = "y =" Cells(m + 8, n + 4).FormulaR1C1 = "phi =" Cells(m + 8, n + 5).FormulaR1C1 = "=IF(R[-1]C[-2]="""",R[-7]C[-2],DEGREES(IF(AND(R[-1]C[-2]>0,RC[-2]<0),2*PI()+ASIN(RC[-2]/R[-1]C),IF(AND(R[-1]C[-2]<=0,RC[-2]>=0),ACOS(R[-1]C[-2]/R[-1]C),IF(AND(R[-1]C[-2]<0,RC[-2]<0),ATAN(RC[-2]/R[-1]C[-2])+PI(),IF(R[-1]C[-2]=0,2*PI()-ACOS(R[-1]C[-2]/R[-1]C),ATAN(RC[-2]/R[-1]C[-2])))))))" Cells(m + 8, n + 21).FormulaR1C1 = "The cylindrical coordinate system is an orthogonal system that has three unit vectors" Cells(m + 9, n + -1).FormulaR1C1 = "=-SIN(RADIANS(R[15]C[3]))" Cells(m + 9, n + 0).FormulaR1C1 = "=COS(RADIANS(R[15]C[2]))" Cells(m + 9, n + 1).FormulaR1C1 = "0" Cells(m + 9, n + 2).FormulaR1C1 = "z =" Cells(m + 9, n + 4).FormulaR1C1 = "z=" Cells(m + 9, n + 5).FormulaR1C1 = "=IF(R[-2]C[-2]="""",R[-7]C[-2],RC[-2])" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[14]C[4]" Cells(m + 10, n + 2).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 10, n + 4).FormulaR1C1 = "|||||||||||||||||||||||||" Cells(m + 10, n + 27).FormulaR1C1 = "(Eq-9-3)" 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 + 3, n + 1).Interior.Color = "12611584" 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 = "(Eq-z)" Call AddNewVector End If ' vector ends If m = m1 + 18 Then ' vector 8 Cells(m + 3, n + -1).FormulaR1C1 = "3" Cells(m + 3, n + 0).FormulaR1C1 = "(Eq-z)" Cells(m + 3, n + 21).FormulaR1C1 = "To convert a point P(r) = P(x,y,z) that is expressed in Cartesian coordinates, to cylindrical coordinates, " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "SHOW VECTOR:" Cells(m + 4, n + 21).FormulaR1C1 = "P(rho, phi, z) the following conversion formulas are needed:" 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 = "rho=0, r=1" Cells(m + 5, n + 5).FormulaR1C1 = "0" Cells(m + 6, n + 27).FormulaR1C1 = "(Eq-9-4)" 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 = "DISPLACEMENT OF THE" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "ORIGIN:" Cells(m + 9, n + -1).FormulaR1C1 = "0" Cells(m + 9, n + 0).FormulaR1C1 = "0" Cells(m + 9, n + 1).FormulaR1C1 = "1" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = "A_ox =" 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 = "A_oy =" Cells(m + 10, n + 5).FormulaR1C1 = "0" 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 = "Use cells E12, E13 and E14 to enter the values of the cylindrical coordinates of a point respectively " Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = " " Call AddNewVector End If ' vector ends If m = m1 + 27 Then ' vector 7 Cells(m + 3, n + -1).FormulaR1C1 = "4" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(R[-7]C[5]=0,"" "",""r"")" Cells(m + 3, n + 4).FormulaR1C1 = "FIX PATH:" Cells(m + 3, n + 21).FormulaR1C1 = "and obtain the Cartesian coordinates of the same point in cells G12, G13 and G14. Press any coordinate " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "(1 or 2)" Cells(m + 4, n + 21).FormulaR1C1 = "system button to view the results." Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0.3" Cells(m + 5, n + 2).FormulaR1C1 = "=IF(R[-23]C[1]="""",R[-16]C[3],IF(R[-16]C[1]="""",R[-23]C[1]))" Cells(m + 5, n + 4).FormulaR1C1 = "rho=" Cells(m + 5, n + 5).FormulaR1C1 = "1" Cells(m + 6, n + 2).FormulaR1C1 = "=IF(R[-24]C[1]="""",R[-16]C[3],IF(R[-17]C[1]="""",R[-23]C[1]))" Cells(m + 6, n + 4).FormulaR1C1 = "phi =" Cells(m + 6, n + 5).FormulaR1C1 = "1" Cells(m + 6, n + 21).FormulaR1C1 = "To convert a point P(rho, phi, z) that is expressed in cylindrical coordinates, to Cartesian " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C[6]" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-6]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=IF(R[-11]C[4]=0,RC[1],0)" Cells(m + 7, n + 2).FormulaR1C1 = "=IF(R[-25]C[1]="""",R[-16]C[3],IF(R[-18]C[1]="""",R[-23]C[3]))" Cells(m + 7, n + 4).FormulaR1C1 = "z=" Cells(m + 7, n + 5).FormulaR1C1 = "1" Cells(m + 7, n + 21).FormulaR1C1 = "coordinates, P(x, y, z) the following conversion formulas are needed:" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "(then press Run.)" Cells(m + 9, n + -1).FormulaR1C1 = "=IF(R[-27]C[4]="""",R[-20]C[4],IF(R[-20]C[4]="""",R[-27]C[6]))" Cells(m + 9, n + 0).FormulaR1C1 = "=IF(R[-27]C[3]="""",R[-19]C[3],IF(R[-20]C[3]="""",R[-26]C[5]))" Cells(m + 9, n + 1).FormulaR1C1 = "=IF(R[-13]C[4]=0,0,R[-2]C[1])" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 27).FormulaR1C1 = "(Eq-9-5)" 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 = "SHOW x, y, z:" Cells(m + 11, n + -1).FormulaR1C1 = "2" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "YES = 0, NO=1" Cells(m + 11, n + 5).FormulaR1C1 = "0" Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = "" Call AddNewVector End If ' vector ends If m = m1 + 36 Then ' vector 6 Cells(m + 3, n + -1).FormulaR1C1 = "5" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-3]C[4]" Cells(m + 5, n + 21).FormulaR1C1 = "Use cells E19, E20 and E21 to enter the Cartesian coordinate values of a point respectively and obtain the " Cells(m + 6, n + 21).FormulaR1C1 = "cylindrical coordinates of the same point in cells G19, G20 and G21. You must delete the contents of " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "0" Cells(m + 7, n + 21).FormulaR1C1 = "cells E12, E13 and E14 for the model to work correctly. Press any button in the coordinate system to " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "view the results in it." Cells(m + 9, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-9]C" 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 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "Experiment with different points in space. When entering cylindrical coordinates, be sure to completely " Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 2).FormulaR1C1 = "7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "delete the cells where Cartesian and vice versa are entered. The model uses several formulas to find the angle" Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = "z" Call AddNewVector End If ' vector ends If m = m1 + 45 Then ' vector 5 Cells(m + 3, n + -1).FormulaR1C1 = "6" Cells(m + 3, n + 0).FormulaR1C1 = "z" Cells(m + 3, n + 21).FormulaR1C1 = "phi due to the behavior of the sine and cosine functions in the different quadrants, however all these formulas " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "are equivalent." Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-12]C[4]" Cells(m + 6, n + 21).FormulaR1C1 = "Delete cells E19, E20 and E21 and enter E12=2, E13 = I5, E14 =2 and press Run, you will see the coordinates " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "0" Cells(m + 7, n + 21).FormulaR1C1 = "travel along the phi angle. Enter G35=2 and press Run again, you will see the different radii of the cylinder " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "during the tour. With G35=1 the radios will be deleted after pressing Run. With cell G26 you can switch " Cells(m + 9, n + -1).FormulaR1C1 = "0" Cells(m + 9, n + 0).FormulaR1C1 = "0" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-47]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 21).FormulaR1C1 = "between the cylindrical radius and the Cartesian radius. Finally, with cells G30 and G31 you can move the " 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 + 10, n + 21).FormulaR1C1 = "origin of cylindrical coordinates with respect to that of Cartesian coordinates." Cells(m + 11, n + -1).FormulaR1C1 = "1" 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 + 3, n + 1).Interior.Color = "12611584" 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 = "" Call AddNewVector End If ' vector ends If m = m1 + 54 Then ' vector 4 Call Project_15(15, m, n, m1, n1) Cells(m + 3, n + -1).FormulaR1C1 = "7" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "186" Cells(m + 4, n + 2).FormulaR1C1 = "To plot a graph:" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "6" Cells(m + 5, n + 1).FormulaR1C1 = "0.3" Cells(m + 5, n + 2).FormulaR1C1 = "1. Max. steps = lenght of the graph." Cells(m + 6, n + -1).FormulaR1C1 = "Choose the vector to make its graphic:" Cells(m + 6, n + 2).FormulaR1C1 = "2. Click Reset graph." Cells(m + 7, n + 2).FormulaR1C1 = "3. Choose in combo box a vector." Cells(m + 8, n + -1).FormulaR1C1 = "Max. steps:" Cells(m + 8, n + 0).FormulaR1C1 = "50" Cells(m + 8, n + 2).FormulaR1C1 = "4. Run simulation or rotate." 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 + 2).FormulaR1C1 = "<-- To keep the graph insert 2." 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 + 3, n + 1).Interior.Color = "12611584" 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 = "x" Call AddNewVector End If ' vector ends If m = m1 + 63 Then ' vector 3 Cells(m + 3, n + -1).FormulaR1C1 = "8" Cells(m + 3, n + 0).FormulaR1C1 = "x" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-30]C[4]" Cells(m + 7, n + -1).FormulaR1C1 = "0" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-25]C" Cells(m + 7, n + 1).FormulaR1C1 = "0" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 9, n + 0).FormulaR1C1 = "0" Cells(m + 9, n + 1).FormulaR1C1 = "0" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = "y" Call AddNewVector End If ' vector ends If m = m1 + 72 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 = "9" Cells(m + 3, n + 0).FormulaR1C1 = "y" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-39]C[4]" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-34]C" Cells(m + 7, n + 0).FormulaR1C1 = "0" Cells(m + 7, n + 1).FormulaR1C1 = "0" Cells(m + 9, n + -1).FormulaR1C1 = "0" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-36]C" Cells(m + 9, n + 1).FormulaR1C1 = "0" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = "Z" Call AddNewVector End If ' vector ends If m = m1 + 81 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "10" Cells(m + 3, n + 0).FormulaR1C1 = "Z" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-48]C[4]" Cells(m + 7, n + -1).FormulaR1C1 = "0" Cells(m + 7, n + 0).FormulaR1C1 = "0" Cells(m + 7, n + 1).FormulaR1C1 = "0" Cells(m + 9, n + -1).FormulaR1C1 = "0" Cells(m + 9, n + 0).FormulaR1C1 = "0" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-65]C" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 3, n + 1).Interior.Color = "12611584" 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 = 10 End If ' vector ends If m = m1 + 81 Then ActiveSheet.DropDowns("List2").Select With Selection ' Do While .ListCount > 0 ' borrar lista .ListIndex = .ListCount .RemoveItem (.ListIndex) Loop i = 3 Do While Cells(m1 + i, n1 - 1) <> "" ' incluir todos los vectores a la lista .AddItem Cells(m1 + i, n1 - 1).Value i = i + 9 Loop End With Sheets("CONFIG").Range("V6").Value = "" Cells(m1 + 9, n1 + 4).Select Call DeleteGraphFunction Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub