Menu

Physics sailboat

Sergio
2022-05-24
2024-08-14
1 2 > >> (Page 1 of 2)
  • Sergio

    Sergio - 2022-05-24

    I am trying to find a GLScene demo to serve as a start point for a sailboat moving in the water in which I can control the velocity. (of the wind) Can anyone give me a suggestion. A ship with speed control would be also useful Thanks in advance

     
  • Filippo Forlani

    Filippo Forlani - 2022-05-25

    hello Sergio,
    sailing there are some polar diagrams for each sailingboat that gives you speed of the boat depending on the angle between direction of the wind and the boat.
    https://en.wikipedia.org/wiki/Polar_diagram_(sailing)
    of course this velocity is in a steady condition, changing while mouvring or changing directions and changing with different waves (height, travel speed, period and angle of incidence to boat)... but I think polar diagram is the starting point.

    hope this helps,
    Filippo

     
  • Sergio

    Sergio - 2022-05-27

    thank you Fillipo I know how tô do the calcularmos of velocidade What I need is just a demo tô use as a start point regards

     
  • Pavel Vassiliev

    Pavel Vassiliev - 2022-05-27

    Hi Sergio,
    You could start with https://sourceforge.net/p/glscene/code/HEAD/tree/trunk/AdvDemos/Archipelago/ or https://sourceforge.net/p/glscene/code/HEAD/tree/branches/Examples/Games/SeaIslandC/ and use the wind instead 4,5 numkeys to increase speed in the selected direction.
    PW

     
    • Sergio

      Sergio - 2022-05-29

      Dear Pavel Thank you very much for this great material. I will read again Archipelago burt I think, in first view, that what I need is Maybe in SeaIsland This week I will go to the details of both

       
  • omar

    omar - 2022-05-27

    Hi

    I have done a few sailboat apps:

    The game "OPYC" for iOS and Android, uses all the above.

    Omar

    videos: https://www.youtube.com/watch?v=50Omdka_yx8
    https://www.tiktok.com/@omar_reis/video/7010454842112101637

     

    Last edit: omar 2022-05-27
  • Sergio

    Sergio - 2022-05-29

    Hello Omar Thank you very much for this great material. In a first view it thas exactly what I need , I downloaded the files and will study them along the week. I will answer here. GBE3D looks really great. I will post

     
  • omar

    omar - 2022-05-30

    Note that GBE3D implements dynamic meshes for FMX 3D.
    I hope this is not off-topic here..

    Added in this fork of GBE3D:

    • TWaveSystem - combination of 3 waves (each w/ center, speed, wave length and amplitude).
    • TOceanSurface ( descends from TGBEPlaneExtend ).
    • TSailSurface - dynamic sail mesh.
    • SailboatDemo demo app.
     

    Last edit: omar 2022-05-30
    • Pavel Vassiliev

      Pavel Vassiliev - 2022-05-30

      Hello omar,
      Your Sailboatdemo really great on the marine subject.
      What do you think about combining GBE3D components with/into GXScene package?
      The models should be in glTF/glb formats.
      Pavel

       

      Last edit: Pavel Vassiliev 2022-05-30
      • omar

        omar - 2022-06-23

        I posted the models used in SailboatDemo in both the original format ( .blend ) and in .glb ( for GXScene ). These can be found at:

        https://github.com/omarreis/GBE3D/tree/master/demos/SailboatDemo/models

         
  • omar

    omar - 2022-05-30

    I'm not familiar with GXScene,
    but I used GLScene for VCL in the past.

    About GBE3D, the original author is Gregory Bersegeay.
    The suite has many useful objects: plants, clouds, waves...

    The 3d models in SailboatDemo are embedded in the form.
    They are in Collada format. I found it to work better with FMX 3D.
    Format .OBJ didn't import the textures right.

    The models were build with Blender and exported to Collada format.
    Blender seems to be able to export to glTF/glb too.
    Requires some testing..

    I'll add the model files to the git repository.

     

    Last edit: omar 2022-06-02
  • Sergio

    Sergio - 2022-06-01

    thank you very much I Will comment soon after understanding better

     
  • omar

    omar - 2022-06-10

    I uploaded version 2.0 of SailboatDemo.
    It was corrected and extended in many ways.

    I'm using this 3D scene in the game "OPYC" ( iOS, Android and Windows ) .
    SailboatDemo form is all rigged to be controlled by external code.

    check this video:

    https://www.youtube.com/watch?v=M9_Z5RxW3Pc

     

    Last edit: omar 2022-06-27
  • Sergio

    Sergio - 2022-06-13

    Thanks to all of you for the great help. The messages were going to my old e-mail. I will check all and comment Regards Sergio

     
  • Sergio

    Sergio - 2024-07-29

    Hi Omar and Pavel. After a long time I finally got time to go back to developments using GLScene and now GBE3D. I restarted though the great Omar SailboatDemo. Really very good. I am exploring it and learning. Runs very well and the concepts behind are very useful. What I am trying to do is to mix it with engineering calculations I do in a simulation software I developed. I am doing some calculations that, at the end, will generate the “speed” of your tblboatspeed . More ahead when my calculations work reasonably, I will present the results here, of course with your credits. Congratulations for your work and thanks again for your comments and Pavels1s ones above. This demo would fit very well within the GLSCene demos.
    By the way, are you in Brazil? I am from Rio de Janeiro. sergiofeitozacosta@gmail.com

     

    Last edit: Sergio 2024-07-30
  • Pavel Vassiliev

    Pavel Vassiliev - 2024-08-02

    Sergio,
    For greater realism, each sail should be made on the physic basis of fabric with the verlet integration, as is done for the actress cape on the wind. More complex model with red sails.
    Pavel

     

    Last edit: Pavel Vassiliev 2024-08-02
  • omar

    omar - 2024-08-02

    In OPYC app, sails are modeled as a chain of interconnected line segments on a box2d scene. The wind on the segments generates forces, which along the forces on the keel, hull and rudder, power the boat in some direction. So the 3D sail is actually 2D polyline, repeated vertically with different chords.

    A popular way to simulate sailboat performance is to use polar charts (speed x twa). These are available for most sailboats.

    btw I'm in São Paulo

     

    Last edit: omar 2024-08-02
  • Sergio

    Sergio - 2024-08-03

    Hi Pavel and Omar. Thank you very much for your comments. Sorry for the long text below. Let me give some more details about what I am trying to do. After a long time, I am now going back to GLScene. I am trying to conclude some unfinished engineering works. GLScene is the only 3D library I know and use for many years. The 3D figures in this 2015 report use GLScene inside an engineering software developed by me. https://www.cognitor.com.br/TR074ENGValidationTempRise.pdf
    YOUR COMMENTS ARE WELCOME TO MY NEXT QUESTIONS. I I am writing wrong things, please correct me. I am trying to learn with your experience
    The SailBoat demo is great as well as GBE3D that I heard about in your previous post. I installed the demo and is running well. I understood that GBE3D is a library with 15 units (corresponding to 15 components?). The components in the SailBoat demo are focused in the waves as an improvement of what we have in GLScene “Arquipelago” . I understood that GREViewPort3D has the same role as TGLSceneviewer in GLScene. So here are my first basic questions
    QUESTION 1) How to add a component to the scene? In the TGLSceneviewer I click the component TGLScene and, after is open , I click “Add component” and there are the several types of components to choose and click to add. Question: Is there a way of adding components more or less like this?
    QUESTION 2) How can I add a single component like a TGLcube or TGLsphere to the GREViewPort3D viewer?
    ABOUT THE SAILBOAT DEMO:
    I understood your points about the physics and the scarlet demo. Your comments seems to suppose that my focus is the “Wind in the Sails” . Something like to associate the speed of the wind to the velocity of the boat. That is perfect in the form it is now. The physics equations for the balance of the boat in the waves.is fantastic. If there is some written explanation document I would love to read it .
    QUESTION 3: Do you know if “CFD – Computational Fluid Dynamics” equations make part of these physics used in GLScene or GBE3D?
    Just for your information, what I am doing is like wind but different. What will generate the “average speed” to enter in the TBboatSpeed trackbar will not be the wind but, instead an effect of interaction of magnetic field. I do a calculation and get the value of the “Propulsion Force” and calculate the conversion to “Speed” and write the value in the the TBboatSpeed trackbar.
    This called in the technical literature as MHD: MagnetoHydroDynamins>
    I am now in the stage of validating the calculated values of “Propulsion Forces” and the related fluid velocity. I know how to do it 100% well for metallic electric conductors. However, when the “forced” conductor is water I need to understand much better the values to know if they are relatively right. See the attached figure with the concept.
    At the end my intention is to demonstrate that MHD is an interesting thing putting a free video in the Web. I am now 70 y.o.. and trying to leave some knowledge public to give me time to reduce engineering to a minimum and write only fiction books and songs . Like in my site cognitor.com.br .
    For me it is a privilege to write and receive responses from people with your knowledge. I easily recognize people who are far above average.
    Sergio

     
  • Sergio

    Sergio - 2024-08-03

    The attachment

     
  • omar

    omar - 2024-08-13

    note that SailboatDemo is not a GLScene app. It uses Firemonkey 3D platform.
    On fmx 3d there is no dedicated UI interface for the 3d scene. 3D objects are part of form components ( 3d viewport childs).

    FMX 3d platform dev seems to be slow. A few projects use it, from what I see.
    One exception is GBE3D by Grégory Bersegeay, a set of components including dynamic grids like the wave surface.

    On the sail model on OPYC app, I used formulas similar to "thin airfoil theory" to calculate each sail segment force. Box2d engine integrates the forces, along with other forces on the scene.
    This may look convoluted when compared to simple polar chart calculations used by most sailing apps. But it gives organic feeling to the simulation. Sails flap when the sheet is loose. Boat do Chinese gybes sometimes. Objects collide.

    Note that none of that uses rigorous physics. Probably not suitable to prove a physical concept

     

    Last edit: omar 2024-08-13
    • Pavel Vassiliev

      Pavel Vassiliev - 2024-08-14

      Omar, I remember you had a good app called Funny Planet. Does it have waves and a sailboat floating on the surface of the planet? I have an app in development called Biosphere, based on an old version of Dave Kerr's AI Planet, it really needs sea waves on the surface of a free form planet with sailboats and other ships. A fleet in the technosphere of terrestrial exoplanet. Portuguese language support can be added to the ..AstrobloQ\locale\pt\ LC_MESSAGES\galaktika.mo file for Brazilian users. But the extracted captions and code 'strings' then need to be translated by analogy with other languages using gnugettext.

       
  • Sergio

    Sergio - 2024-08-13

    Hello Omar. Very useful information. I am studying the possibilities. In this moment I think the best for me will be to try to do what I need inside GLScene, even not so well as in your demo. Actualy in my case the "wind forces " are not the key. I think I will be able to do what I need . Will post something in the near future. I understood well your explanation. I do not want to go using CFD. It is more powerful than I need. By this reason I developed my simpler engineering software SwitchgearDesign . Regards and thanks again https://www.cognitor.com.br/TR_150_ENG_ValidationSwitchgearDesignSWD.pdf

     
    • Pavel Vassiliev

      Pavel Vassiliev - 2024-08-14

      Sergio, do you have a code to simulate sea waves on a sphere, the surface of an exoplanet, with a sailboat and other ships navigation? I am looking for delphi programmers to further development of the Biosphere and be included in the GalaxyMW team - https://gitverse.ru/glscene/AstrobloQ , the simulator of galaxy habitability and communications.

       
  • Sergio

    Sergio - 2024-08-14

    Hi Pavel. I will download and install . I am ready to collaborate.

    I am trying to find the GREEN BUTTON <> to download the complet stuff in the link in Russian . Even with Google translator I did not find. Which button is ?
    About the code to simulate waves, I do not have any. In that my code I am trying to use someone which is ready to use; The one Omar showed is great but not GLscene.. I need something that I can use inside my GLScene code

     

    Last edit: Sergio 2024-08-14
    • Pavel Vassiliev

      Pavel Vassiliev - 2024-08-14

      Hi Sergio, you can simply clone the git repository https://gitverse.ru/glscene/AstrobloQ to your comp, e.g. in the d:\AstrobloQ.git folder, but make changes in another working folder d:\AstrobloQ. Then use BeyondCompare 4 to make patches. You can work on different projects separately without need to make branches, that only complicates the development. Add autogeneration of habitat, relief, seas, climate and weather depending on the type and parameters of exoplanets (change flora and fauna, the NASA list currently includes more then 70 terraplanets with an ESI coefficient > 50 and may be somewhere else life exists, the csv file included in data). Another important point - you need to redo the selection of icons for environmental objects, animals and vehicles using new TVirtualImageList components. Otherwise, the choice is not very convenient. I added you to the contributors, you have already done a lot before.
      Pavel

       

      Last edit: Pavel Vassiliev 2024-08-14
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.