Sub Project_38_ES(ByVal VecType, m, n, m1, n1 As Integer) ' 38_Paraboloide_ES ' Updated: 4/05/25 ' Created by: Daniela Ortiz, Fabian Gomez (13/12/24) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 38 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 ="900" Cells(m1 + 0, n1 + 6).FormulaR1C1 ="=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 ="=CONFIG!R3C9" Cells(m1 + 0, n1 + 8).FormulaR1C1 ="Daniela Ortiz, Fabian Gomez (13/12/24)" Cells(m1 + 1, n1 + 2).FormulaR1C1 ="=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 ="500" 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 ="=CONFIG!R4C9" Cells(m1 + 2, n1 + 0).FormulaR1C1 ="t = 5,019531 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 ="=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 ="5" Cells(m1 + 2, n1 + 4).FormulaR1C1 ="=CONFIG!R5C6" Cells(m1 + 2, n1 + 5).FormulaR1C1 ="15" Cells(m1 + 2, n1 + 6).FormulaR1C1 ="=CONFIG!R5C8" Cells(m1 + 2, n1 + 7).FormulaR1C1 ="=CONFIG!R5C9" Cells(m1 + 3, n1 + 0).FormulaR1C1 ="A" Cells(m1 + 3, n1 + 1).FormulaR1C1 ="15" Cells(m1 + 3, n1 + 2).FormulaR1C1 ="=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 ="=CONFIG!R6C5" 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 = "HELP Comment:" & Chr(10) & _ " 1. To create new projects, press the +Vector button without selecting any project in the project list." & Chr(10) & _ " 2. To load an existing project, select a project from the list and then press +Vector" & Chr(10) & _ " 3. To export a new project, press the Get Code button. The code will be saved on your PC in the same directory where this file is located." & Chr(10) & _ " " & Chr(10) & _ " If necessary, use this comment to create your own HELP comment for your project. To do this, simply replace this text with your own (Right Click, Edit Comment) and avoid special characters." & Chr(10) & _ " After pressing Get Code, your comment will be updated and saved in the same txt file as your project and will be uploaded after the project appears in ScienSolar.To include the new project in ScienSolar, perform the following steps:" & Chr(10) & _ " a) Open the txt file where the project was saved; b) copy all the contents of the file and paste it in the VBA Editor of the Excel file ScienSolar; c) add the project name and number to the list on the CONFIG sheet; d) Verify that the number is correlative and that it agrees with the project header number, if not modify it in the header or in the list as necessary." & Chr(10) & _ " Right click to delete or edit this comment." & Chr(10) & _ " " & Chr(10) & _ " For documentation on ScienSolar, please visit www.sciensolar.com. ScienSolar was designed for 3D physics modeling in MS Excel.It is normal that for some projects it takes time to load it in the sheet, it depends on the number of objects in your project and the performance of your PC." On Error Resume Next Cells(m1 , n1 + 9).Comment.Text Text:= HELPtxt If m = m1 + 0 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 ="1" Cells(m + 3, n + 0).FormulaR1C1 ="A" Cells(m + 3, n + 1).FormulaR1C1 ="15" Cells(m + 3, n + 2).FormulaR1C1 ="=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 ="=CONFIG!R6C5" 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 + 1).FormulaR1C1 ="=""o[""&R[6]C[4]&""]x=[-""&R[5]C[4]/2&"";""&R[5]C[4]/2&""]o2[""&R[6]C[4]&""]y=[-""&R[4]C[4]/2&"";""&R[4]C[4]/2&""]o3[0,5]z=[0;0]color=[""&R[7]C[4]+R[10]C[4]&""]origin[cart.]=[0;0;0]tfactor=0,002446455s""" Cells(m + 4, n + 2).FormulaR1C1 ="PARABOLOIDE" Cells(m + 4, n + 12).FormulaR1C1 ="CONSTRUCTOR DE PARABOLOIDES " Cells(m + 4, n + 24).FormulaR1C1 ="INSTRUCCIONES" Cells(m + 5, n + -1).FormulaR1C1 ="677" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="0.3" 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 + 4).FormulaR1C1 ="Dimensiones (cm):" Cells(m + 7, n + 21).FormulaR1C1 ="MARCO TE" & ChrW(211) & "RICO" Cells(m + 8, n + -1).FormulaR1C1 ="50" Cells(m + 8, n + 0).FormulaR1C1 ="50" Cells(m + 8, n + 1).FormulaR1C1 ="0" Cells(m + 8, n + 4).FormulaR1C1 ="Largo :" Cells(m + 8, n + 5).FormulaR1C1 ="100" Cells(m + 9, n + -1).FormulaR1C1 ="0" Cells(m + 9, n + 0).FormulaR1C1 ="0" Cells(m + 9, n + 1).FormulaR1C1 ="=R[4]C[2]*R[-1]C[-2]^2+R[5]C[2]*R[-1]C[-1]^2+R[2]C[4]" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + 4).FormulaR1C1 ="Ancho:" Cells(m + 9, n + 5).FormulaR1C1 ="100" Cells(m + 9, n + 21).FormulaR1C1 ="Un paraboloide es una superficie cuadr" & ChrW(225) & "tica que puede ser el" & ChrW(237) & "ptica o hiperb" & ChrW(243) & "lica. En este caso," Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="=R[9]C[5]" Cells(m + 10, n + 1).FormulaR1C1 ="1" Cells(m + 10, n + 2).FormulaR1C1 ="=IF(R[3]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + 4).FormulaR1C1 ="paso:" Cells(m + 10, n + 5).FormulaR1C1 ="4" Cells(m + 10, n + 21).FormulaR1C1 ="nos enfocamos en el paraboloide el" & ChrW(237) & "ptico, que tiene la forma de un ""plato"" parab" & ChrW(243) & "lico extendido" Cells(m + 11, n + -1).FormulaR1C1 ="6" Cells(m + 11, n + 0).FormulaR1C1 ="=R[9]C[5]" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 4).FormulaR1C1 ="Altura:" Cells(m + 11, n + 5).FormulaR1C1 ="5" Cells(m + 11, n + 21).FormulaR1C1 ="en 3D." Cells(m + 3, n + 1).Interior.Color = "13998939" Cells(m + 3, n + 1).Font.Size = "14" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "f" Call AddNewVector end if ' vector ends If m = m1 + 9 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 ="2" Cells(m + 3, n + 0).FormulaR1C1 ="f" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="146" Cells(m + 4, n + 2).FormulaR1C1 ="A =" Cells(m + 4, n + 3).FormulaR1C1 ="=1/(4*RC[2])" Cells(m + 4, n + 4).FormulaR1C1 ="Foco:" Cells(m + 4, n + 5).FormulaR1C1 ="65" Cells(m + 4, n + 21).FormulaR1C1 =" Ecuaci" & ChrW(243) & "n general del paraboloide el" & ChrW(237) & "ptico " 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 ="B =" Cells(m + 5, n + 3).FormulaR1C1 ="=1/(4*R[-1]C[2])" Cells(m + 5, n + 4).FormulaR1C1 ="Gradiente:" Cells(m + 5, n + 5).FormulaR1C1 ="20" Cells(m + 5, n + 21).FormulaR1C1 ="La ecuaci" & ChrW(243) & "n est" & ChrW(225) & "ndar de un paraboloide el" & ChrW(237) & "ptico centrado en el origen y alineado con los ejes es: " Cells(m + 7, n + -1).FormulaR1C1 ="=R[2]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[2]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[2]C" Cells(m + 8, n + 2).FormulaR1C1 =" TABLA CON ALTURAS EN CADA PUNTO:" Cells(m + 8, n + 27).FormulaR1C1 ="(Eq-Parab-1)" Cells(m + 9, n + -1).FormulaR1C1 ="0" Cells(m + 9, n + 0).FormulaR1C1 ="0" Cells(m + 9, n + 1).FormulaR1C1 ="=1/(4*R[-5]C[2])+R[-7]C[4]" Cells(m + 9, n + 2).FormulaR1C1 =" (ejemplo: Fila=40, Col=10, luego op. XYZ):" 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 =" La tabla empieza en:" Cells(m + 10, n + 4).FormulaR1C1 ="fila:" Cells(m + 10, n + 5).FormulaR1C1 ="0" Cells(m + 11, n + -1).FormulaR1C1 ="6" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="10" Cells(m + 11, n + 4).FormulaR1C1 ="columna:" Cells(m + 11, n + 5).FormulaR1C1 ="0" Cells(m + 11, n + 21).FormulaR1C1 ="Donde: " Cells(m + 3, n + 1).Interior.Color = "255" Cells(m + 3, n + 1).Font.Size = "12" 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 = 2 end if ' vector ends If m = m1 + 9 Then Cells(m + 12, n + 21).FormulaR1C1 ="- f es la distancia focal (G16). " Cells(m + 13, n + 21).FormulaR1C1 ="- h es la altura del v" & ChrW(233) & "rtice (G14). " Cells(m + 14, n + 21).FormulaR1C1 ="- x y y son las coordenadas horizontales (A11 y B11). " Cells(m + 15, n + 21).FormulaR1C1 =" - En G17 se introduce la altura del color azul para el gradiente ( rojo-amarillo-verde-azul)" Cells(m + 16, n + 21).FormulaR1C1 ="INSTRUCCIONES PARA USO DEL MODELO:" Cells(m + 18, n + 21).FormulaR1C1 ="1. Ingresar Datos: " Cells(m + 19, n + 21).FormulaR1C1 =" - Largo (G11): Define la extensi" & ChrW(243) & "n en el eje x . " Cells(m + 20, n + 21).FormulaR1C1 =" - Ancho (G12): Define la extensi" & ChrW(243) & "n en el eje y . " Cells(m + 21, n + 21).FormulaR1C1 =" - Paso (G13): Define la resoluci" & ChrW(243) & "n de la superficie. " Cells(m + 22, n + 21).FormulaR1C1 =" - Altura (G14): Establece la altura base del paraboloide. " Cells(m + 23, n + 21).FormulaR1C1 =" - Foco (G16): Controla qu" & ChrW(233) & " tan ""abierto"" o ""cerrado"" es el paraboloide (a menor valor, m" & ChrW(225) & "s" Cells(m + 24, n + 21).FormulaR1C1 ="pronunciada la curvatura)." Cells(m + 26, n + 21).FormulaR1C1 ="2. Generar Tabla: " Cells(m + 27, n + 21).FormulaR1C1 =" - El modelo calcular" & ChrW(225) & " autom" & ChrW(225) & "ticamente los valores de z (altura) en diferentes puntos (x, y)" Cells(m + 28, n + 21).FormulaR1C1 ="usando la f" & ChrW(243) & "rmula anteriormente descrita. Para generar la tabla ingrese G22=40, G23=10." Cells(m + 29, n + 21).FormulaR1C1 ="Oprima XYZ para ver generar los datos." Cells(m + 30, n + 21).FormulaR1C1 =" - Para borrar la tabla, oprima el bot" & ChrW(243) & "n de la derecha en B6 (antes de anular G22 y G23)" Cells(m + 31, n + 21).FormulaR1C1 =" - Para no generar tabla: G22=0, G23=0. " Cells(m + 32, n + 21).FormulaR1C1 =" - Los valores de x y y se toman de las celdas A11 y B11, respectivamente. " Cells(m + 34, n + 21).FormulaR1C1 ="3. Visualizaci" & ChrW(243) & "n: " Cells(m + 35, n + 21).FormulaR1C1 =" - Para visualizar los cambios oprima el bot" & ChrW(243) & "n XYZ. " Cells(m + 37, n + 21).FormulaR1C1 ="4. Notas: " Cells(m + 38, n + 21).FormulaR1C1 =" - Si desea un paraboloide con curvaturas diferentes en x e y , modifique las constantes E16 y E17. " Cells(m + 39, n + 21).FormulaR1C1 =" - Aseg" & ChrW(250) & "rese de que el foco (G16) no sea cero para evitar divisi" & ChrW(243) & "n por error. " Cells(m + 40, n + 21).FormulaR1C1 =" - Puede construir un paraboloide de cualquier material, por ejemplo aluminio, con tubos con las" Cells(m + 41, n + 21).FormulaR1C1 =" alturas dadas en la tabla sujetos a un plano, y luego recubrir la superficie superior con un material " Cells(m + 42, n + 21).FormulaR1C1 =" flexible y de alta reflexi" & ChrW(243) & "n." Call BlackWhiteDesk Call PutEqBut end if ' actualizar hoja End Sub