SlideShare a Scribd company logo
1 of 26
Tutorial Falling Cube




School of Electrical Engineering & Computer Science,
                                                         1
National University of Sciences & Technology, Pakistan
Run Sofa Modeler
• After installing sofa
• Go to the bin folder at installed location and double
  click the Modeler




                      Muhammad Muddassir Malik      2
Modeler
• After double clicking a Modeler a GUI window will
  open up as shown below, with sofa components on
  its left side and scene graph on its right.




                    Muhammad Muddassir Malik    3
• There you will see root node already added.
  – This node will control the global behavior of the
    simulation.
  – Majority of them are used to control the Collisions and
    the responses between two or more objects during the
    simulation.
     • In our current exercise there is only one object so all of them
       are not needed.
  – All new nodes will be added under it and consequently
    properties added to it will effect upon all other nodes.

                           Muhammad Muddassir Malik                 4
Deleting the unwanted nodes
• Delete all of the already placed properties root node by
  selecting them and pressing the delete button (as they are
  not required in our current exercise)




                        Muhammad Muddassir Malik         5
Adding a node
• Then you have to add a node under whom whole
  properties for a physical entity is going to be placed.
• For this you have to drag and drop GNode (placed
  almost at left bottom of the Modeler under Sofa
  Components) on Root node.




                      Muhammad Muddassir Malik       6
Adding a node




  Muhammad Muddassir Malik   7
Name the node
• To name the node double click on the node and
  overwrite your desired name in object name blank
  of property 1/2 tab. In this example we will name it
  cube and then press the ok button.




                     Muhammad Muddassir Malik      8
Mesh topology
• First of all to define and/or load the topology our
  object’s mesh we have to add the MeshTopology
  component.
• MeshToplogy define the topology and the relation
  of one vertices with the other.
• Drag and Drop MeshTopology (lying in Topology
  drop down of the sofa components) on the cube
  node.


                     Muhammad Muddassir Malik      9
Mesh topology




   Muhammad Muddassir Malik   10
Loading the Mesh
• Now we need to load and link the mesh of our object.
• Three easy ways to link and/or load the mesh with the topology are
   – Load the mesh with in MeshTopolgy object.(practiced in this
      exercise)
   – Link the already Loaded Mesh (loaded through a loader e.g.
      MeshObjLoader)
   – Define the position of vertices in the mechanical object.
• To load the mesh file double click the MeshTopolgy Object and it will
  open up a new Window.
• In Property 1/3, under file topology Click on the three dots like … in
  front filename of the object and browse it to the location of your
  intended object file (which is C:sofasharemeshcube.obj in our
  current case).
                             Muhammad Muddassir Malik               11
Loading the Mesh




    Muhammad Muddassir Malik   12
Mechanical state
• To define the mechanical properties and degree of
  freedom you will have to add mechanicalObject.
  – Here in Mechanical state of Rigid type object can only
    act in a non-deformable way.
  – While Vec3d type objects could act in both deformable
    and non-deformable way.
  – LaparoscopicRigid3 act same as Rigid type but with a
    pivot in its center.
  – Here 3d means three dimensional degrees of freedom
    with precision of double and 3f means 3 dimensional
    degree of freedom with precision of float.

                       Muhammad Muddassir Malik        13
Adding MechanicalObject
• Click Mechanical State to open the drop down
  – there you will find another drop down on the right side
     • click to open that dropdown and select Vec3d from it
• Drag and drop MechanicalObject with Vec3d option
  on the node present in the scene graph.




                         Muhammad Muddassir Malik             14
Adding Mass to the object
• To define the mass of the object you have to add a
  Mass component.
• Click on the Mass option (Just above Mechanical State)
  in sofa components to have a look at the available mass
  options in a drop down form.
• Select the Uniform Mass (simplest) of Vec3d for the
  current exercise others will be used in relatively
  complex type of exercises.
  – Make sure it is of same type as of MechanicalObject which is
    Vec3d in our current case.
• Drag and drop it on the cube node.
                        Muhammad Muddassir Malik            15
Adding Mass to the object




        Muhammad Muddassir Malik   16
Adding Solvers
• Now to solve all of the equations running behind the
  intended simulation we have to add some
  mathematical solver.
• For the instance you will have to add an ode solver
  followed by a linear solver for our current exercise.
• Resultant of our ODE solver are the Linear equations
  which are further efficiently solved by Linear Solver.
• For that you will have to drag and drop
  EulerImplicitSolver from ode solver and CGLinearSolver
  from Linear Solver.

                      Muhammad Muddassir Malik      17
Adding Solvers




   Muhammad Muddassir Malik   18
Visual node
• Afterwards we will put another GNode in our cube
  Node to handle the graphical display.
• For that we will again drag and drop GNode on cube
  node and name it cubeVisual.




                    Muhammad Muddassir Malik    19
Visual Model
• We will now have to place a graphical display
  modeler in the node.
• For that we will drag and drop the OglModel from
  the VisualModel dropdown.
• In the property 2/4 of OglModel we will browse file
  mesh the location of the intended show model
  which is C:sofasharemeshcube.obj in our
  current case.


                     Muhammad Muddassir Malik     20
OglModel




Muhammad Muddassir Malik   21
Mapping
• Now to map our graphical model on the mechanical
  object we will use a mapping function.
• For this purpose you will have to drag and drop
  BarycentricMapping from the mapping dropdown
  of the sofa component to the Visual Node.




                    Muhammad Muddassir Malik   22
Adding Barycentric Mapping




         Muhammad Muddassir Malik   23
Run sofa
• Now you are done with your development of first
  exercise i.e. falling cube due to gravitational force.
• Click the run in sofa button, lying on the to middle
  of the modeler screen.




                       Muhammad Muddassir Malik       24
Animate
• It will open up another GUI window.
• There you have to click the animate button to run
  the animation.




                     Muhammad Muddassir Malik    25
Video




Muhammad Muddassir Malik   26

More Related Content

Viewers also liked

Piug presentation jane_list_lighthouse_ip_group_2012
Piug presentation jane_list_lighthouse_ip_group_2012Piug presentation jane_list_lighthouse_ip_group_2012
Piug presentation jane_list_lighthouse_ip_group_2012Lighthouse IP Group
 
天闻数媒科技(北京)有限公司招聘需求及简介
天闻数媒科技(北京)有限公司招聘需求及简介天闻数媒科技(北京)有限公司招聘需求及简介
天闻数媒科技(北京)有限公司招聘需求及简介yangzaif
 
Sdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnoteSdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnoteLighthouse IP Group
 
Sdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnoteSdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnoteLighthouse IP Group
 
INTRODUCTION TO Monarch Advisory Group
INTRODUCTION TO Monarch Advisory GroupINTRODUCTION TO Monarch Advisory Group
INTRODUCTION TO Monarch Advisory GroupTim Entwisle
 
Vm sistemi suite data discovery
Vm sistemi suite data discoveryVm sistemi suite data discovery
Vm sistemi suite data discoverySilvia Montanari
 

Viewers also liked (6)

Piug presentation jane_list_lighthouse_ip_group_2012
Piug presentation jane_list_lighthouse_ip_group_2012Piug presentation jane_list_lighthouse_ip_group_2012
Piug presentation jane_list_lighthouse_ip_group_2012
 
天闻数媒科技(北京)有限公司招聘需求及简介
天闻数媒科技(北京)有限公司招聘需求及简介天闻数媒科技(北京)有限公司招聘需求及简介
天闻数媒科技(北京)有限公司招聘需求及简介
 
Sdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnoteSdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnote
 
Sdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnoteSdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnote
 
INTRODUCTION TO Monarch Advisory Group
INTRODUCTION TO Monarch Advisory GroupINTRODUCTION TO Monarch Advisory Group
INTRODUCTION TO Monarch Advisory Group
 
Vm sistemi suite data discovery
Vm sistemi suite data discoveryVm sistemi suite data discovery
Vm sistemi suite data discovery
 

Similar to First Tutorial - Falling cube

Incarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume WorldIncarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume WorldYung-Luen Lan
 
Methods of protyping-1.pptx
Methods of protyping-1.pptxMethods of protyping-1.pptx
Methods of protyping-1.pptxrr8086137
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding ProcessNina Park
 
Mode d’emploie delta force xtreme mission editor
Mode d’emploie delta force xtreme mission editorMode d’emploie delta force xtreme mission editor
Mode d’emploie delta force xtreme mission editorFabian Chailler
 
Geogebra for physics
Geogebra for physicsGeogebra for physics
Geogebra for physicsLenore Horner
 
Beginning iOS6 Development CH04 More User Interface Fun
Beginning iOS6 Development CH04 More User Interface FunBeginning iOS6 Development CH04 More User Interface Fun
Beginning iOS6 Development CH04 More User Interface FunAbdulrazzaq Alnajjar
 
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docxFluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docxbryanwest16882
 
Unity - Building your first real-time 3D project
Unity - Building your first real-time 3D projectUnity - Building your first real-time 3D project
Unity - Building your first real-time 3D projectNexusEdgesupport
 
SolidWorks report.pptx
SolidWorks report.pptxSolidWorks report.pptx
SolidWorks report.pptxMohakRanjan
 
FCPL 2022.pptx
FCPL 2022.pptxFCPL 2022.pptx
FCPL 2022.pptxVickyTGAW
 
Modeling for 3D Printing with Tinkercad
Modeling for 3D Printing with TinkercadModeling for 3D Printing with Tinkercad
Modeling for 3D Printing with TinkercadVickyTGAW
 
VGEGIS%20Training%20Tutorial
VGEGIS%20Training%20TutorialVGEGIS%20Training%20Tutorial
VGEGIS%20Training%20Tutorialtutorialsruby
 
VGEGIS%20Training%20Tutorial
VGEGIS%20Training%20TutorialVGEGIS%20Training%20Tutorial
VGEGIS%20Training%20Tutorialtutorialsruby
 

Similar to First Tutorial - Falling cube (20)

Incarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume WorldIncarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume World
 
Max2015 ch01
Max2015 ch01Max2015 ch01
Max2015 ch01
 
Methods of protyping-1.pptx
Methods of protyping-1.pptxMethods of protyping-1.pptx
Methods of protyping-1.pptx
 
Readme
ReadmeReadme
Readme
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding Process
 
Mode d’emploie delta force xtreme mission editor
Mode d’emploie delta force xtreme mission editorMode d’emploie delta force xtreme mission editor
Mode d’emploie delta force xtreme mission editor
 
redmy
redmyredmy
redmy
 
mastercam_full
mastercam_fullmastercam_full
mastercam_full
 
mastercam_full
mastercam_fullmastercam_full
mastercam_full
 
Geogebra for physics
Geogebra for physicsGeogebra for physics
Geogebra for physics
 
Beginning iOS6 Development CH04 More User Interface Fun
Beginning iOS6 Development CH04 More User Interface FunBeginning iOS6 Development CH04 More User Interface Fun
Beginning iOS6 Development CH04 More User Interface Fun
 
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docxFluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
 
Lecture2_practice.pdf
Lecture2_practice.pdfLecture2_practice.pdf
Lecture2_practice.pdf
 
Unity - Building your first real-time 3D project
Unity - Building your first real-time 3D projectUnity - Building your first real-time 3D project
Unity - Building your first real-time 3D project
 
SolidWorks report.pptx
SolidWorks report.pptxSolidWorks report.pptx
SolidWorks report.pptx
 
FCPL 2022.pptx
FCPL 2022.pptxFCPL 2022.pptx
FCPL 2022.pptx
 
Modeling for 3D Printing with Tinkercad
Modeling for 3D Printing with TinkercadModeling for 3D Printing with Tinkercad
Modeling for 3D Printing with Tinkercad
 
VGEGIS%20Training%20Tutorial
VGEGIS%20Training%20TutorialVGEGIS%20Training%20Tutorial
VGEGIS%20Training%20Tutorial
 
VGEGIS%20Training%20Tutorial
VGEGIS%20Training%20TutorialVGEGIS%20Training%20Tutorial
VGEGIS%20Training%20Tutorial
 
Motor3 d v13
Motor3 d v13Motor3 d v13
Motor3 d v13
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

First Tutorial - Falling cube

  • 1. Tutorial Falling Cube School of Electrical Engineering & Computer Science, 1 National University of Sciences & Technology, Pakistan
  • 2. Run Sofa Modeler • After installing sofa • Go to the bin folder at installed location and double click the Modeler Muhammad Muddassir Malik 2
  • 3. Modeler • After double clicking a Modeler a GUI window will open up as shown below, with sofa components on its left side and scene graph on its right. Muhammad Muddassir Malik 3
  • 4. • There you will see root node already added. – This node will control the global behavior of the simulation. – Majority of them are used to control the Collisions and the responses between two or more objects during the simulation. • In our current exercise there is only one object so all of them are not needed. – All new nodes will be added under it and consequently properties added to it will effect upon all other nodes. Muhammad Muddassir Malik 4
  • 5. Deleting the unwanted nodes • Delete all of the already placed properties root node by selecting them and pressing the delete button (as they are not required in our current exercise) Muhammad Muddassir Malik 5
  • 6. Adding a node • Then you have to add a node under whom whole properties for a physical entity is going to be placed. • For this you have to drag and drop GNode (placed almost at left bottom of the Modeler under Sofa Components) on Root node. Muhammad Muddassir Malik 6
  • 7. Adding a node Muhammad Muddassir Malik 7
  • 8. Name the node • To name the node double click on the node and overwrite your desired name in object name blank of property 1/2 tab. In this example we will name it cube and then press the ok button. Muhammad Muddassir Malik 8
  • 9. Mesh topology • First of all to define and/or load the topology our object’s mesh we have to add the MeshTopology component. • MeshToplogy define the topology and the relation of one vertices with the other. • Drag and Drop MeshTopology (lying in Topology drop down of the sofa components) on the cube node. Muhammad Muddassir Malik 9
  • 10. Mesh topology Muhammad Muddassir Malik 10
  • 11. Loading the Mesh • Now we need to load and link the mesh of our object. • Three easy ways to link and/or load the mesh with the topology are – Load the mesh with in MeshTopolgy object.(practiced in this exercise) – Link the already Loaded Mesh (loaded through a loader e.g. MeshObjLoader) – Define the position of vertices in the mechanical object. • To load the mesh file double click the MeshTopolgy Object and it will open up a new Window. • In Property 1/3, under file topology Click on the three dots like … in front filename of the object and browse it to the location of your intended object file (which is C:sofasharemeshcube.obj in our current case). Muhammad Muddassir Malik 11
  • 12. Loading the Mesh Muhammad Muddassir Malik 12
  • 13. Mechanical state • To define the mechanical properties and degree of freedom you will have to add mechanicalObject. – Here in Mechanical state of Rigid type object can only act in a non-deformable way. – While Vec3d type objects could act in both deformable and non-deformable way. – LaparoscopicRigid3 act same as Rigid type but with a pivot in its center. – Here 3d means three dimensional degrees of freedom with precision of double and 3f means 3 dimensional degree of freedom with precision of float. Muhammad Muddassir Malik 13
  • 14. Adding MechanicalObject • Click Mechanical State to open the drop down – there you will find another drop down on the right side • click to open that dropdown and select Vec3d from it • Drag and drop MechanicalObject with Vec3d option on the node present in the scene graph. Muhammad Muddassir Malik 14
  • 15. Adding Mass to the object • To define the mass of the object you have to add a Mass component. • Click on the Mass option (Just above Mechanical State) in sofa components to have a look at the available mass options in a drop down form. • Select the Uniform Mass (simplest) of Vec3d for the current exercise others will be used in relatively complex type of exercises. – Make sure it is of same type as of MechanicalObject which is Vec3d in our current case. • Drag and drop it on the cube node. Muhammad Muddassir Malik 15
  • 16. Adding Mass to the object Muhammad Muddassir Malik 16
  • 17. Adding Solvers • Now to solve all of the equations running behind the intended simulation we have to add some mathematical solver. • For the instance you will have to add an ode solver followed by a linear solver for our current exercise. • Resultant of our ODE solver are the Linear equations which are further efficiently solved by Linear Solver. • For that you will have to drag and drop EulerImplicitSolver from ode solver and CGLinearSolver from Linear Solver. Muhammad Muddassir Malik 17
  • 18. Adding Solvers Muhammad Muddassir Malik 18
  • 19. Visual node • Afterwards we will put another GNode in our cube Node to handle the graphical display. • For that we will again drag and drop GNode on cube node and name it cubeVisual. Muhammad Muddassir Malik 19
  • 20. Visual Model • We will now have to place a graphical display modeler in the node. • For that we will drag and drop the OglModel from the VisualModel dropdown. • In the property 2/4 of OglModel we will browse file mesh the location of the intended show model which is C:sofasharemeshcube.obj in our current case. Muhammad Muddassir Malik 20
  • 22. Mapping • Now to map our graphical model on the mechanical object we will use a mapping function. • For this purpose you will have to drag and drop BarycentricMapping from the mapping dropdown of the sofa component to the Visual Node. Muhammad Muddassir Malik 22
  • 23. Adding Barycentric Mapping Muhammad Muddassir Malik 23
  • 24. Run sofa • Now you are done with your development of first exercise i.e. falling cube due to gravitational force. • Click the run in sofa button, lying on the to middle of the modeler screen. Muhammad Muddassir Malik 24
  • 25. Animate • It will open up another GUI window. • There you have to click the animate button to run the animation. Muhammad Muddassir Malik 25