Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 7th Apr 2008 10:34
Hi,
I would like to simulate magnets, which are attached to rotatable objects for example. Can I make it with this version of Dark Physics ? thank you


PS: Real programmers aren't afraid of math!.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Apr 2008 12:46
The latest update (in your order history) has force fields. You can use them to create a magnet effect.
wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 7th Apr 2008 13:49
ok, but what about magnet poles ? I think, that I have to make two forces for object, first positive and second negative ? Is it true ? good idea ? or, is there better way ? Thank you


btw: there is no keywords, no help files... why is all so ***scamp ?

*** - Iam not english speaker, so, I dont know, what exactly scamp mean, I think, that scamp is, that someone is incompetent to complete things, which started.


PS: Real programmers aren't afraid of math!.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Apr 2008 13:59
It won't do poles. Force fields either attract or push things away. You would need to do some clever programming to create a magnet with poles, I think.

New commands:

phy create force field ID
phy delete force field ID

phy set force field rigid body ID, Object
phy set force field cloth scale ID, scale#
phy set force field constant ID, x#, y#, z#
phy set force field velocity target ID, x#, y#, z#
phy set force field coordinates ID, type
phy set force field linear falloff ID, x#, y#, z#
phy set force field quadratic falloff ID, x#, y#, z#
phy set force field noise ID, x#, y#, z#
phy set force field position ID, x#, y#, z#
phy set force field rigid body scale ID, scale#
phy set force field soft body scale ID, scale#
phy set force field torus radius ID, radius#

phy build force field ID

phy add force field box ID, mode, x#, y#, z#, sizex#, sizey#, sizez#
phy add force field sphere ID, mode, x#, y#, z#, radius#
phy add force field capsule ID, mode, x#, y#, z#, height#, radius#

integer = phy get force field exist ( ID )
wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 7th Apr 2008 14:32
BatVink : so, my idea with two force fields can be realized, I hope. Thank you for commands.


PS: Real programmers aren't afraid of math!.
wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 7th Apr 2008 18:36
hm, it doenst work, as I want. Have anyone idea, how to simulate real magnets ?


PS: Real programmers aren't afraid of math!.
Codger
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 9th Apr 2008 05:11
Technically the force fields represent a gravity force not a magnetic one. Magnets only affect iron based items so by definition you cannot simulate "real magnet"

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Apr 2008 05:45
hmm magnets are very interesting

here's a quick idea i had for the poles
i don't have dark physics so this is pseudo code

this would produce
N+N = 4
N+S = 0 (or is it 1?)
S+S = 4

hmm... not sure if I just made this more complicated

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 9th Apr 2008 23:31
I would have thought you'd do it with a take away.

N=1
S=-1
ABS(N-S) = 2
ABS(N-N) = 0
ABS(S-N) = 2
ABS(S-S) = 0

That way, opposites attract.


I fail at life. No, really.
JerBil
20
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 11th Apr 2008 04:22
Here is one way.

Ad Astra Per Asper

Attachments

Login to view attachments
wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 12th Apr 2008 12:38
JerBil : yes, great example, thank you, but what about 2 and more magnets ?


PS: Real programmers aren't afraid of math!.
JerBil
20
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 13th Apr 2008 04:50
I don't know since a negative force in this case will repel a
positive object, instead of attracting, so it isn't so easy.
That is, in Dark Physics the force is acting on the object instead of the other force.

Ad Astra Per Asper

Login to post a reply

Server time is: 2024-11-24 22:54:03
Your offset time is: 2024-11-24 22:54:03