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

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 

Recently uploaded (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 

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