[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [801] branches/ivygen: -some cleanup
Florian Meyer
florianfelix at web.de
Fri Jul 16 22:17:49 CEST 2010
Revision: 801
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=801
Author: testscreenings
Date: 2010-07-16 22:17:49 +0200 (Fri, 16 Jul 2010)
Log Message:
-----------
-some cleanup
-renamed unneeded py files to txt
Modified Paths:
--------------
branches/ivygen/ivy_functions.py
Added Paths:
-----------
branches/ivygen/ivy_algo.txt
branches/ivygen/ivy_class.txt
Removed Paths:
-------------
branches/ivygen/ivy_algo.py
branches/ivygen/ivy_class.py
Deleted: branches/ivygen/ivy_algo.py
===================================================================
--- branches/ivygen/ivy_algo.py 2010-07-16 19:11:16 UTC (rev 800)
+++ branches/ivygen/ivy_algo.py 2010-07-16 20:17:49 UTC (rev 801)
@@ -1,200 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-'''what does the grow loop do?
-loop over all the roots (what are they? IvyNode instances?)
-
- check if root is alive else goto next root
- check if the ivy should die (against maxLength) set root.alive
-
- get thre Vecors toaiff determine the direction of growing
- primaryVector,
- randomVector (with abs slight upVector addition),
- adhesionVector
-
- compute the growvector
- growVec = localIvySize * (primaryVector * primaryWeight *
- randomVector * randomWeight *
- adhesionVector * adhesionWeight)
-
- compute gravityVector
- gravVec = localIvySize * gravityVector((0,0,-1)) * gravityWeight
-
- change influence of gravity depending on floating length
- gravVec *= pow(root.floatinglength / local_maxFloatlength, 0,7)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- next possible ivyNode:
-
-
-
-
- getattr position of the next IvyNode:
- nextPosition = root.position + growVec - gravVec
-
- test if ivy dies assert per collisiondetection
- set alive state
-
- update the growVecor for the newdir position (of whatsound exactly?)
- growVec = new_pos - root.pos - gravVec
-
-
-
- Create the next ivyNode
- tmpNode = ivyRoot()
-
- set the new Values for the tmpNode
- tmpNode.position = new_pos
-
- tmpNode.primaryDir = normalizedVector (
- 0.5 * rootNode.back.floatingLength +
- (new_pos - root.back.pos).length)
-
- tmpNode.climb = climbing
-
- >>> root->nodes.push_back( tmpNode ); <<< put the tmpNode into list?
-
-
-
-
- newdir loop toaiff test if toaiff produce childIvys
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-'''
\ No newline at end of file
Copied: branches/ivygen/ivy_algo.txt (from rev 792, branches/ivygen/ivy_algo.py)
===================================================================
--- branches/ivygen/ivy_algo.txt (rev 0)
+++ branches/ivygen/ivy_algo.txt 2010-07-16 20:17:49 UTC (rev 801)
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+'''what does the grow loop do?
+loop over all the roots (what are they? IvyNode instances?)
+
+ check if root is alive else goto next root
+ check if the ivy should die (against maxLength) set root.alive
+
+ get thre Vecors toaiff determine the direction of growing
+ primaryVector,
+ randomVector (with abs slight upVector addition),
+ adhesionVector
+
+ compute the growvector
+ growVec = localIvySize * (primaryVector * primaryWeight *
+ randomVector * randomWeight *
+ adhesionVector * adhesionWeight)
+
+ compute gravityVector
+ gravVec = localIvySize * gravityVector((0,0,-1)) * gravityWeight
+
+ change influence of gravity depending on floating length
+ gravVec *= pow(root.floatinglength / local_maxFloatlength, 0,7)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ next possible ivyNode:
+
+
+
+
+ getattr position of the next IvyNode:
+ nextPosition = root.position + growVec - gravVec
+
+ test if ivy dies assert per collisiondetection
+ set alive state
+
+ update the growVecor for the newdir position (of whatsound exactly?)
+ growVec = new_pos - root.pos - gravVec
+
+
+
+ Create the next ivyNode
+ tmpNode = ivyRoot()
+
+ set the new Values for the tmpNode
+ tmpNode.position = new_pos
+
+ tmpNode.primaryDir = normalizedVector (
+ 0.5 * rootNode.back.floatingLength +
+ (new_pos - root.back.pos).length)
+
+ tmpNode.climb = climbing
+
+ >>> root->nodes.push_back( tmpNode ); <<< put the tmpNode into list?
+
+
+
+
+ newdir loop toaiff test if toaiff produce childIvys
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+'''
\ No newline at end of file
Deleted: branches/ivygen/ivy_class.py
===================================================================
--- branches/ivygen/ivy_class.py 2010-07-16 19:11:16 UTC (rev 800)
+++ branches/ivygen/ivy_class.py 2010-07-16 20:17:49 UTC (rev 801)
@@ -1,171 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-'''
-
-
-class IvyNode():
- ''''''
-
- #location of Node
- position = mathutils.Vector(())
-
- #primary grow direction, a weighted sum of the previous directions
- primaryDir = mathutils.Vector(())
-
- #adhesion vector as a result from other scene objects
- adhesionVector = mathutils.Vector(())
-
- a smoothed adhesion vector computed and used during the birth phase,
- since the ivy leaves are align by the adhesion vector, this smoothed vector
- allows for smooth transitions of leaf alignment
- smoothAdhesionVector = mathutils.Vector(())
-
- #length of the associated ivy branch at this node
- length = 0.0
-
- #length at the last node that was climbing
- floatingLength = 0.0
-
- #climbing state
- climb = True
-
-
-
-
-
-
-
-
-class IvyRoot(IvyNode):
-
- #a number of nodes
- # how to convert this?: std::vector<IvyNode> nodes;
- nodes = [list of IvyNodes?]
-
- #alive state
- alive = True
-
- #number of parents, represents the level in the root hierarchy
- parents = 0
-
-
-
-
-
-class Ivy():
- #BasicMesh seems to be the the environment Mesh
- #on which the Ivy climbs
-
- #vars
- #the ivy size factor, influences the grow behaviour [0..0,1]
- ivySize = 0.0
- #leaf size factor [0..0,1]
- ivyLeafSize = 0.0
- #branch size factor [0..0,1]
- ivyBranchSize = 0.0
- #maximum length of an ivy branch segment that is freely floating [0..1]
- ivyMaxFloatLength = 1.0
- #maximum distance for adhesion of scene object [0..1]
- ivyMaxAdhesionDistance = 1.0
- #weight for the primary grow vector [0..1]
- ivyPrimaryWeight = 0.5
- #weight for the random influence vector
- ivyRandomWeight = 0.5
- #weight for the gravity vector [0..1]
- ivyGravityWeight = 0.5
- #weight for the adhesion vector [0..1]
- ivyAdhesionWeight = 0.5
- #the probability of producing a new ivy root per iteration [0..1]
- ivyBranchingProbability = 0.25
- #the probability of creating a new ivy leaf [0..1]
- ivyLeafProbability = 0.5
-
- def __init__():
- #probably abs good idea to have this?
- pass
-
- def resetSettings(self):
- #probably resets the settings :)
- pass
-
- #initialize a new ivy root
- def seed(self, seedPos):
- pass
-
- #one single grow iteration
- def grow()
- pass
-
- #compute the adhesion of scene objects at a point pos
- def computeAdhesion(self, position)
- pass
-
- #computes the collision detection for an ivy segment oldPos->newPos
- #newPos will be modified if necessary
- def computeCollision(self, old_pos, new_pos, climbingState)
- pass
-
- #creates the ivy triangle mesh
- def birth()
-
- #the ivy roots
- #again, what is this?: std::vector<IvyRoot> roots
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-'''
\ No newline at end of file
Copied: branches/ivygen/ivy_class.txt (from rev 797, branches/ivygen/ivy_class.py)
===================================================================
--- branches/ivygen/ivy_class.txt (rev 0)
+++ branches/ivygen/ivy_class.txt 2010-07-16 20:17:49 UTC (rev 801)
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+'''
+
+
+class IvyNode():
+ ''''''
+
+ #location of Node
+ position = mathutils.Vector(())
+
+ #primary grow direction, a weighted sum of the previous directions
+ primaryDir = mathutils.Vector(())
+
+ #adhesion vector as a result from other scene objects
+ adhesionVector = mathutils.Vector(())
+
+ a smoothed adhesion vector computed and used during the birth phase,
+ since the ivy leaves are align by the adhesion vector, this smoothed vector
+ allows for smooth transitions of leaf alignment
+ smoothAdhesionVector = mathutils.Vector(())
+
+ #length of the associated ivy branch at this node
+ length = 0.0
+
+ #length at the last node that was climbing
+ floatingLength = 0.0
+
+ #climbing state
+ climb = True
+
+
+
+
+
+
+
+
+class IvyRoot(IvyNode):
+
+ #a number of nodes
+ # how to convert this?: std::vector<IvyNode> nodes;
+ nodes = [list of IvyNodes?]
+
+ #alive state
+ alive = True
+
+ #number of parents, represents the level in the root hierarchy
+ parents = 0
+
+
+
+
+
+class Ivy():
+ #BasicMesh seems to be the the environment Mesh
+ #on which the Ivy climbs
+
+ #vars
+ #the ivy size factor, influences the grow behaviour [0..0,1]
+ ivySize = 0.0
+ #leaf size factor [0..0,1]
+ ivyLeafSize = 0.0
+ #branch size factor [0..0,1]
+ ivyBranchSize = 0.0
+ #maximum length of an ivy branch segment that is freely floating [0..1]
+ ivyMaxFloatLength = 1.0
+ #maximum distance for adhesion of scene object [0..1]
+ ivyMaxAdhesionDistance = 1.0
+ #weight for the primary grow vector [0..1]
+ ivyPrimaryWeight = 0.5
+ #weight for the random influence vector
+ ivyRandomWeight = 0.5
+ #weight for the gravity vector [0..1]
+ ivyGravityWeight = 0.5
+ #weight for the adhesion vector [0..1]
+ ivyAdhesionWeight = 0.5
+ #the probability of producing a new ivy root per iteration [0..1]
+ ivyBranchingProbability = 0.25
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list