Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Monad Research
Message
De
19/01/2009 13:27:01
 
 
À
19/01/2009 13:22:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01375100
Message ID:
01375157
Vues:
11
>>The initial conditions are listed there.
>>
>>The rules can be found by following the hyper link on Listing A, which is this page:
>>
>>http://cloudmusiccompany.com/paper.htm
>>
>>Find Listing A, that's the rules.
>>
>>Here's the program I've been running for the majority of those results:
>>...
>
>OK, there's a lot of Visual FoxPro code, but I see no plain-text description what it is supposed to do. I assume that you generate a set of objects that can be represented as points on a plane, or in space, and that those objects change their position with time, according to certain rules.

Every monad has an X, Y, and Z, plus a change in X, Y, and Z.

The rules are that first every monad updates its X, Y, and Z based on its dX, dY, and dZ.

Then, the monad exchanges its trajectories with every other monad. Here's the relevant code:
	procedure DoStuff
	
		* move inertially
		this.nX = this.nX + this.nDx
		this.nY = this.nY + this.nDy
		this.nZ = this.nZ + this.nDz
		
		* see if there's anything to interact with
		for each oB in oAbsoluteMatter
			lnDx = oB.nDx
			lnDy = oB.nDy
			lnDz = oB.nDz
			oB.nDx = this.nDx
			oB.nDy = this.nDy
			oB.nDz = this.nDz
			this.nDx = lnDx
			this.nDy = lnDy
			this.nDz = lnDz
		endfor 
	
	endproc
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform