Changing SPH Settings

About advanced scenes, and the Thyme scripting language used in Algodoo.

Changing SPH Settings

Postby xplane80 » Sun Jan 17, 2010 1:12 am

To change then type in the code into the console

Defaults for SPH
  • SPH.density = 1
  • SPH.friction = 0.01
  • SPH.influence = 2
  • SPH.radius = 0.05
  • SPH.restitution = 0
  • SPH.specialPressure = true
  • SPH.vaporizeTime = 5
  • SPH.viscosity = 0.5
Image<- Designed by PhysicsGuy
User avatar
xplane80
 
Posts: 498
Joined: Mon Aug 31, 2009 7:28 pm

Re: Changing SPH Settings

Postby Fujitsu » Sun Jan 17, 2010 1:32 am

For those of you who don't know, the console is brought down by pressing the tilde key "~".
Image
Gimmie money.
User avatar
Fujitsu
 
Posts: 328
Joined: Tue Sep 01, 2009 12:28 am
Location: Canada

Re: Changing SPH Settings

Postby Cs24 » Tue Jan 19, 2010 1:26 am

Is there a way to change SPH.SetNewSPH or SPH.SetClassicSPH using oncollide/onLaserhit?
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am

Re: Changing SPH Settings

Postby standardtoaster » Tue Jan 19, 2010 1:44 am

Is this what you mean?
Code: Select all
(e)=>{SPH.SetNewSPH}
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Changing SPH Settings

Postby KarateBrot » Tue Jan 19, 2010 4:23 am

Cs24 wrote:Is there a way to change SPH.SetNewSPH or SPH.SetClassicSPH using oncollide/onLaserhit?


Yes, there is. But if you do it don't upload the scene to algobox or the angry ghosts of people which downloaded it will haunt you.

No, seriously. When changing SPH values or other important values via laser, onCollide etc. you'll screw up the config file of people which downloaded the scene.
Changing SPH.SetNewSPH and SPH.SetClassicSPH won't be fatal. It just turns "incompressible fluids" on/off but for other settings it can be the case.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Changing SPH Settings

Postby Cs24 » Tue Jan 19, 2010 11:05 pm

funny 'cause
Code: Select all
(e)=>{SPH.SetNewSPH}

wasn't working yesterday, now it does :crazy: (needed it for my water soft-body car, which needs ClassicSPH)

and yes I know how people (see n00bs) have spasms when something "screws over" like the hide GUI in this scene
Filesize: 129.09 kB
download

at least there are some (see newbie) who ask for help instead of 1 spamming. :roll:

EDIT: What's the code that sets self-delete of a "drop" of water (when isolated)?
Newbie Thymer
Intermediate Phuner
Cs24
 
Posts: 41
Joined: Tue Nov 03, 2009 5:30 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest