Physion

  • Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Username Password: Remember me

is there a way to create objects in "layers"?
(1 viewing) (1) Guest

TOPIC: is there a way to create objects in "layers"?

Re: is there a way to create objects in "layers"? 3 years, 7 months ago #866

P.P.S.....

Such a clock 'Escapement', as depicted just before YOUR post, is technically feasible, but at this stage can only be done by creating your own complex polygons. That is a subject i want to explain more on this forum in the near future. Although in THIS case, it would not be too hard to SIMULATE a stepped motion of a 'gear' with Javascript, via the onupdate property, which will be a snippet of code that runs every time the scene is 'updated' within the Physion physics simulation !! in conjunction with a VISUALLY simulated rocker.....
1x1 square diag = root-2. Cube diag = root-3. Beautiful !

Re: is there a way to create objects in "layers"? 3 years, 7 months ago #868

  • LGONZALEZ65
  • OFFLINE
  • Fresh Boarder
  • d/dt(∂L/∂q’)-∂L/∂q=0
  • Posts: 4
Excellent explanation!. I'll try it asap!

With respect to the grid:
I've been using the change-size-of-grid feature, but the fact is that the minimum resolution is 0.2m, that's really the problem.

In order to simulate "real life" objects (that is, objects of about the size of a man, not in the order of 20 or more meters) it would be desirable to have a resolution of 0.02m or less, so that you can model with good accuracy.

I've seen that the physical environment takes into account an Y (variable) gravity set by default in -10 (I assume m/s2). So, in the current situation, if I want to simulate a model with 10 times de current accuracy (i.e. 0.02m), I make my model 10 times bigger, use the 0.2m grid, and change the Y gravity setting to -100 instead of -10 (I'm making assumptions, don't really know if this is correct). For this reason I think it would be better to work with more resolution 'natively', this is just a comment of course.

Re: is there a way to create objects in "layers"? 3 years, 7 months ago #869

Thankyou for your prompt response... and have taken your new questions onboard !
I will respond tomorrow. Is midnight here now, and look forward to answering your questions then. Am in Western Australia. Where are you ? Back soon ....
1x1 square diag = root-2. Cube diag = root-3. Beautiful !

Re: is there a way to create objects in "layers"? 3 years, 7 months ago #870

Hello again...
I understand what you mean. Mostly it is a limitation of 'Box2D' which is the underlying physics engine used by 'Physion'. Generally it doesn't like very small numbers, which are really all just arbitrary anyway and could represent any 'units', although the default thought process in the 'Box2D' world is to call them 'Metres'.

So, yes, just scale everything up and zoom out, to 'simulate' a different scale. And yes, setting gravity to -100 instead of -10 would make things VISUALLY appear to fall etc at a more realistic rate.

One reason for limiting the scaling/grids to smaller values, is that you would see things you were not meant to !! Create some boxes, and let them fall and settle to a stop. Now ZOOM right in, to where the objects are supposedly 'touching', and you will see a gap!!
'Box2D' equates this to be about '5 millimetres', assuming 'Metres' are the scale.
This is a built in buffer-zone for collision detection, to keep both objects 'happy' in their space, to stop constant physical chattering, and repeated 'OnContact' event triggers.
So if you were dealing with 10mm size objects, the gaps would look ridiculous!

In regards to world gravity settings in Physion, and visual realism, the maths for gravity are often miss-understood. A setting of -10, (-9.8 on Earth), does equate to 10 m/s/s, but that does NOT mean that after the 1st second it has fallen 10-m !!
After 1 Sec it has fallen 5m, but is at a speed then of 10m/s.
(v = g * t, and d = 0.5 * g * t-squared. And t = squareroot of d / .5 / g)

As a demonstration of this, I've uploaded a test scene to one of my servers....
(Right-click the file below, and select Save-Link-As)....

Attachment AAA-TestGravity.scene not found


The instructions are in the demo scene.
Have fun... Glenn. (Will be moving these posts later...)
1x1 square diag = root-2. Cube diag = root-3. Beautiful !

Re: is there a way to create objects in "layers"? 3 years, 7 months ago #871

  • LGONZALEZ65
  • OFFLINE
  • Fresh Boarder
  • d/dt(∂L/∂q’)-∂L/∂q=0
  • Posts: 4
Thank you Glenn. This is enlightening.

I would like to simulate mechanical systems in order to achieve a real time visually real time accurate display.

So, my questions have to do with (maybe I'd have to read about the simulation engine):

- How can I relate address density to get the right simulation: Is density=1 a surface density? How should I relate it to water density (what z axis deepness should I assume to have an equivalente water volume?) This would be very useful. I could calculate loads, inertia moments, etc.
- Rotating Joints: Is the motor.Speed an impossed speed assuming infinite torque? Or is it really a torque, assuming some unknown internal friction? Is the rotating joint linked to the virtual motor by a spring (and damper)?

I think that if I could address questions like these succesfully I would have excellent 'real world' 2D simulations!

I appreciate your help.


Regards

Leonardo González

Re: is there a way to create objects in "layers"? 3 years, 7 months ago #872

Hello again Leonardo....

(maybe I'd have to read about the simulation engine)

While learning the basics, you might want to steer clear of too much 'Box2D' under the hood!! 'Physion' does a pretty good job of simulating a majority of the basics, especially in conjunction with some bits of Javascript code in certain triggered Events etc.
I mentioned it, to touch on limitations and reasons.
The 'Command-Line' Console is a good way to experiment, but is off-topic...

How can I relate address density to get the right simulation: Is density=1 a surface density?

Firstly, we need to understand that this is really a 2D world, (visually). Objects 'Assume' and act as though they are 2D objects, but you need to consider this....
A rectangle (or square) has width and height properties, whereas a circle has a radius, (not a diameter).
In the simulated Physics world, an object conforms to UNITS, such that a 1 x 1 square, has a density of 1, and a mass of 1, initially.
Notice! that for objects, you can NOT change the mass property directly. But you CAN change the density from the default of '1', which automatically RESULTS in an updated value for it's MASS.
Just as a 1 x 1 cube of Lead has more mass per volume than a 1 x 1 cube of wood.

Turn the grid on, and set to size-1. Create rectangles 1x1, 1x2, 2x2...
They all originally have a density of 1, but masses of 1, 2, and 4.
Change their Density, and see the corresponding change in 'Mass'.
To simulate 3D, you would need to adjust the density so that 2x2 does not have a mass of 4, but 8 !!

Notice also, that no matter what the size, or density/mass of an object, that they will all fall at the same rate, as in real life, due to gravity.
This is normal !! (Can't change universal real physics hahaha...).
But of course objects of different density/mass have their own Inertia!, and behave correspondingly during collisions etc !!

How should I relate it to water density

This is a whole new topic, and one that I'm working on again, as we speak!!
Give me another day or 2, (for MY benefit as well as yours/others), and i think you will be amazed. Involves Javascript too of course, and is an extension/rework of something old, involving all of the above and more, and i can see it answering your questions at a multiple level... Will have documents to explain all.

Rotating Joints: Is the motor.Speed an impossed speed assuming infinite torque? Or is it really a torque, assuming some unknown internal friction? Is the rotating joint linked to the virtual motor by a spring (and damper)?

This is (can be) complex too...
No, the 'Torque' is not 'infinite', but is equally not easily definable. 'Physion', (and Box2D'), has limitations, and those forces CAN be broken within a sim, or cause a 'Motor' to 'Stall', and you can read the current 'MotorTorque' during events.
Pin a long rectangle with a revolute joint, and set the revolute joint to motor enabled, and speed to what ever. Place a kinematic object in the movement path to 'stall' the motor attached to the object, and while running, click on the revolute joint and see the torque... It actually takes quite a bit to stop it, and against a 'spring' attached to a near body, changing the spring K-factor (property) to about 1,500 to stop the rotation.
REALLY this needs the explanation that i will supply soon !!!!

Will keep you posted, and please start a new topic under 'General Discussions' etc.
Glenn
1x1 square diag = root-2. Cube diag = root-3. Beautiful !
Moderators: Lynxx, Glenn555
Time to create page: 0.17 seconds