[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [865] branches/ivygen/ivy_test.py: == ivy ==
Florian Meyer
florianfelix at web.de
Wed Jul 28 18:28:35 CEST 2010
Revision: 865
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=865
Author: testscreenings
Date: 2010-07-28 18:28:35 +0200 (Wed, 28 Jul 2010)
Log Message:
-----------
== ivy ==
- no oversampling on edges anymore
Modified Paths:
--------------
branches/ivygen/ivy_test.py
Modified: branches/ivygen/ivy_test.py
===================================================================
--- branches/ivygen/ivy_test.py 2010-07-28 15:04:59 UTC (rev 864)
+++ branches/ivygen/ivy_test.py 2010-07-28 16:28:35 UTC (rev 865)
@@ -347,6 +347,7 @@
def generateSamples(faces, mesh):
samplePoints = []
+ rows = 6
for face in faces:
print('face', face.index)
@@ -376,7 +377,7 @@
# add edgesamples (3 each)
a = 0.0
- samp = 3
+ samp = rows
for i in range(samp):
a += 1 / (samp + 1)
#print('edge a', a)
@@ -449,11 +450,11 @@
mesh.verts[face.verts[3]].co]]
#add samples from first tri
- samplePoints += samplesOnTry(tri_1[0][0], tri_1[0][1], tri_1[1])
+ samplePoints += samplesOnTry(tri_1[0][0], tri_1[0][1], tri_1[1], rows=rows)
#add samples from second tri
if isQuad:
- samplePoints += samplesOnTry(tri_2[0][0], tri_2[0][1], tri_2[1])
+ samplePoints += samplesOnTry(tri_2[0][0], tri_2[0][1], tri_2[1], rows=rows)
#print('samplePoints - all: ', len(samplePoints))
return samplePoints
@@ -467,12 +468,13 @@
for row in range(rows+1):
b += 1 / (rows +1)
a = 0.0
+ c = 0.95
samp = row
for s in range(samp):
a += 1 / (samp + 1)
- sample = (base + (vecA.lerp(vecB, a) * b)) #concerning b: still need to offset for the last row
- samples.append(sample) #or we have duplicated samples at the tri intersection
+ sample = (base + (vecA.lerp(vecB, a) * b * c)) #concerning b: still need to offset for the last row
+ samples.append(sample) #or we have duplicated samples at the tri intersection
#print('\n samples', len(samples))
return samples
@@ -490,6 +492,7 @@
sortetSample = sorted(samplePoints, key=lambda point: (NodePoint - point).length)
+ #debugmesh for the sampling points
meshFromPoints(sortetSample)
print('sortetSample - all: ', len(sortetSample))
More information about the Bf-extensions-cvs
mailing list