[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [806] branches/ivygen/ivy_functions.py: - start of explanation how the adhesion computation is supposed to work

Florian Meyer florianfelix at web.de
Sat Jul 17 03:41:19 CEST 2010


Revision: 806
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=806
Author:   testscreenings
Date:     2010-07-17 03:41:04 +0200 (Sat, 17 Jul 2010)

Log Message:
-----------
- start of explanation how the adhesion computation is supposed to work

Modified Paths:
--------------
    branches/ivygen/ivy_functions.py

Modified: branches/ivygen/ivy_functions.py
===================================================================
--- branches/ivygen/ivy_functions.py	2010-07-17 00:59:35 UTC (rev 805)
+++ branches/ivygen/ivy_functions.py	2010-07-17 01:41:04 UTC (rev 806)
@@ -97,7 +97,33 @@
         
         
         
-def computeAdhesion(): #tmp, needs to be filled :)
+def computeAdhesion(old_pos?): #tmp, needs to be filled :)
+    '''
+    ok, first: what does he exactly wnat to do here?
+    the function returns the adhesionVector. so my best guess would be that
+    this is the force and direction towards the surface.
+    combined with the adhesionWeight this then defines how strongly the Ivy wants to stick to the surface.
+    
+    so how does he do that?:
+    -check for nearest face of the mesh
+    -now this again i don't quiet get:
+        -scalar produt projection of old_pos to the center of the fface?:
+            float nq = Vector3d::dotProduct(t->norm, pos - t->v0->pos)
+    -check if the projection nq(?) is on the outer side of the face
+        if not: continue
+    
+   -...
+   
+   -compute barycentric coordinates of p0  <<<?>>>
+   
+   -at last compute normalized direction of adhesion
+   -and multiply it with the ditance to the surface divided by the scale_factor of the local_maxAdhesion
+   -return the adhesionVector
+   
+   ####### obviously the middle i haven't figured out yet #########
+   
+    '''
+    
     pass
         
         




More information about the Bf-extensions-cvs mailing list