[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2811] contrib/py/scripts/addons/ geodesic_domes: vefm_259: superformula parameters adjusted to formulas in wikipedia ( semi-parametes! of supere-ellipse)

Peter K.H. Gragert pkhgragert at gmail.com
Tue Dec 27 09:06:40 CET 2011


Revision: 2811
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2811
Author:   pkhg
Date:     2011-12-27 08:06:31 +0000 (Tue, 27 Dec 2011)
Log Message:
-----------
vefm_259:superformula parameters adjusted to formulas in wikipedia (semi-parametes! of supere-ellipse)
third_domes_panel.py tooltips added with better range of ua and ub

Modified Paths:
--------------
    contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py
    contrib/py/scripts/addons/geodesic_domes/vefm_259.py

Modified: contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py
===================================================================
--- contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py	2011-12-26 18:44:56 UTC (rev 2810)
+++ contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py	2011-12-27 08:06:31 UTC (rev 2811)
@@ -284,18 +284,18 @@
 #for choice of superformula
     uact = BoolProperty(name = 'superformula u (x/y)', description = "activate superformula u parameters", default = False)
     vact = BoolProperty(name = 'superformula v (z)', description = "activate superformula v parameters", default = False)
-    um = FloatProperty(name = 'um', min = 0, soft_min=0.1, soft_max=5,max = 10,\
+    um = FloatProperty(name = 'um', min = 0, soft_min=0.1, soft_max = 10, max = 20,\
                  description = "to do",	default =  3)
-    un1 = FloatProperty(name = 'un1', min = 0, soft_min=0.1, soft_max=5,max = 20,\
+    un1 = FloatProperty(name = 'un1', min = 0, soft_min=0.1, soft_max = 10,max = 20,\
                  description = "to do",	default =  1)
-    un2 = FloatProperty(name = 'un2', min = 0, soft_min=0.1, soft_max=5,max = 10,\
+    un2 = FloatProperty(name = 'un2', min = 0, soft_min=0.1, soft_max = 10,max = 20,\
                  description = "to do",	default =  1)
-    un3 = FloatProperty(name = 'un3', min = 0,   soft_min=0.1, soft_max=5,max = 10,\
+    un3 = FloatProperty(name = 'un3', min = 0,   soft_min=0.1, soft_max = 10, max = 20,\
                  description = "to do",	default =  1)
-    ua = FloatProperty(name = 'ua', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1.0)
-    ub = FloatProperty(name = 'ub', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  4.0)
+    ua = FloatProperty(name = 'ua', min = 0.01, soft_min=0.1, soft_max = 8, max = 16,\
+                 description = "semi-diameter (has both soft pars!)", default =  1.0)
+    ub = FloatProperty(name = 'ub', min = 0.01, soft_min = 0.1, soft_max = 8, max = 16,\
+                 description = "semi-diameter  (has both soft pars!)", default =  1.0)
     vm = FloatProperty(name = 'vm', min = 0, soft_min=0.1, soft_max=5,max = 10,\
                  description = "to do",	default =  1)
     vn1 = FloatProperty(name = 'vn1', min = 0, soft_min=0.1, soft_max=5,max = 10,\

Modified: contrib/py/scripts/addons/geodesic_domes/vefm_259.py
===================================================================
--- contrib/py/scripts/addons/geodesic_domes/vefm_259.py	2011-12-26 18:44:56 UTC (rev 2810)
+++ contrib/py/scripts/addons/geodesic_domes/vefm_259.py	2011-12-27 08:06:31 UTC (rev 2811)
@@ -456,11 +456,13 @@
         r = self.power(1.0/(t1+t2),(1.0/n1))
         return r
 
+#PKHG changed according to http://de.wikipedia.org/wiki/Superformel
+#a and b a semi-diameter
     def superform(self,m,n1,n2,n3,uv,a,b,twist):
-        t1 = cos(m*(uv+twist)*.25)*a
+        t1 = cos(m*(uv+twist)*.25) / a
         t1 = abs(t1)
         t1 = t1**n2
-        t2 = sin(m*(uv+twist)*.25)*b
+        t2 = sin(m*(uv+twist)*.25) / b
         t2 = abs(t2)
         t2 = t2**n3
         r = self.power(1.0/(t1+t2),n1)        



More information about the Bf-extensions-cvs mailing list