Exemple #1
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("depth", "Depth of fractility", default=2, max=10),
         DialogFloat("branchProbability",
                     "Probability of branching",
                     default=0.7,
                     min=0.0,
                     max=1.0),
         DialogFloat("percent", "Fractility size decrease", default=0.3),
         DialogYesNo("round", "Rounded crystals", default=False),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000,
                   rbutton=True),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
     self.table = [(0.0, 0.0), (width, length)]
Exemple #2
0
 def __init__(self, cols, rows):
     self.editor = [
         DialogInt("balloons",     "Number of Balloons",       default=7, min=1, max=15),
         DialogInt("minSize",      "Minimum Size",             units="pixels", default=1, min=1, max=min(cols, rows)),
         DialogInt("maxSize",      "Maximum Size",             units="pixels", default=min(cols, rows)/4., min=1, max=min(cols, rows)),
         DialogFloat("maxSpeed",     "Maximum Speed",            units="pixels/second", default=10., min=0.01, max=min(cols, rows)),
     ]
Exemple #3
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("knots", "Number of Knots", default=5, min=0, max=20),
         DialogFloat("rKnot",
                     "Maximum Knot Radius",
                     units=units,
                     default=inchesToUnits(5.0, units),
                     min=inchesToUnits(1.0, units),
                     max=max(width, length)),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000,
                   rbutton=True),
         DialogInt("xLines",
                   "Number of points/line",
                   default=200,
                   min=50,
                   max=600),
         DialogInt("yLines", "Number of lines", default=40, min=5, max=100),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Exemple #4
0
 def __init__(self, cols, rows):
     self.end = (cols + rows) * 2
     self.editor = [
         DialogFloat("angle",
                     "Source angle",
                     units="degrees",
                     default=2.0,
                     min=0.0,
                     max=720.0,
                     step=1.),
         DialogFloat("degsPerFrame",
                     "Degrees per refresh",
                     units="degrees",
                     default=2.0,
                     min=0.0,
                     max=30.0,
                     step=1.),
         DialogFloat("degsSpan",
                     "Color span",
                     units="degrees",
                     default=0.5,
                     min=0.00001,
                     max=360.0,
                     step=.5),
         DialogInt("delaySteps", "Delay steps", default=0, min=0, max=500),
         DialogBreak(),
         DialogInt("brightness",
                   "Brightness",
                   units="percent",
                   default=50,
                   min=0,
                   max=100),
     ]
Exemple #5
0
 def __init__(self, cols, rows):
     self.editor = [
         DialogInt("modulus",
                   "Lights per Marquee",
                   default=10,
                   min=1,
                   max=1000),
         DialogInt("delaySteps", "Delay Steps", default=10, min=0,
                   max=1000),
     ]
Exemple #6
0
 def __init__(self, cols, rows):
     self.end = cols * 2 + rows * 2
     self.editor = [
         DialogList("palette",
                    "Palette",
                    default='Fire',
                    list=sorted(palettes.keys())),
         DialogInt("speed", "Ember Delay", default=10, min=1, max=30),
         DialogInt("b", "Brightness", default=128, min=1, max=255),
     ]
Exemple #7
0
 def __init__(self, cols, rows):
     pal = list(palettes.keys())[randint(0, len(palettes) - 1)]
     self.editor = [
         DialogList("palette",
                    "Palette",
                    default=pal,
                    list=sorted(palettes.keys())),
         DialogInt("points", "Points per Color", default=5, min=1, max=200),
         DialogInt("steps", "Points to Step", default=5, min=1, max=200),
         DialogInt("delaySteps", "Delay Steps", default=20, min=0,
                   max=1000),
     ]
Exemple #8
0
 def __init__(self, width, length, ballSize, units):
     scale = width / length
     self.editor = [
         DialogInt("rows", "Rows", default=8, min=1, max=20),
         DialogInt("cols",
                   "Columns",
                   default=int(8 * scale),
                   min=1,
                   max=int(20 * scale)),
         DialogFloat("turns", "Turns", default=3.0, min=1, max=15.0),
         DialogFloat("angleRate",
                     "Sample Rate",
                     units="degrees",
                     default=15.0,
                     min=-360.0,
                     max=360.0),
         DialogFloat("sizeModifier",
                     "Size Modifier",
                     units="percent",
                     default=1.,
                     min=.75,
                     max=1.25),
         DialogBreak(),
         DialogFloat("xCorner",
                     "X Corner",
                     units=units,
                     default=0.0,
                     min=0.0,
                     max=width,
                     randRange=(0., 0.)),
         DialogFloat("yCorner",
                     "Y Corner",
                     units=units,
                     default=0.0,
                     min=0.0,
                     max=length,
                     randRange=(0., 0.)),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width,
                     randRange=(width, width)),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length,
                     randRange=(length, length)),
     ]
Exemple #9
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogInt("points", "Polygon points", default=10, min=3, max=50),
         DialogInt("interp",
                   "Interpolated points",
                   default=5,
                   min=0,
                   max=10),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000.0,
                   rbutton=True),
         DialogFloat("randomness",
                     "Randomness",
                     units="percent",
                     default=10.,
                     min=0.,
                     max=100.),
         DialogFloat("rotation",
                     "Rotation",
                     units="degrees",
                     default=0.,
                     min=-180.,
                     max=180.),
         DialogBreak(),
         DialogInt("polygons", "Polygon Count", default=10, min=1, max=100),
         DialogFloat("r1",
                     "First radius",
                     units=units,
                     min=0.0,
                     max=max(width, length) * 2),
         DialogFloat("r2",
                     "Second radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=0.0,
                     max=max(width, length) * 2),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Exemple #10
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("maxHeight",
                     "Maximum height",
                     units=units,
                     default=length * .75,
                     min=1.0,
                     max=length),
         DialogFloat("maxWind",
                     "Maximum wind",
                     units=units,
                     default=inchesToUnits(1., units),
                     min=0.,
                     max=inchesToUnits(4., units)),
         DialogInt("blades", "Blades of grass", default=100, min=1,
                   max=250),
         DialogYesNo(
             "dWind",
             "Directional wind",
         ),
     ]
     self.width = width
     self.length = length
     self.thickness = inchesToUnits(1, units)
     self.steps = 5
Exemple #11
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogInts("teeths",
                    "Wheel Teeth",
                    units="n1,n2,...",
                    default=[40, -30],
                    min=-60,
                    max=60,
                    minNums=2,
                    maxNums=3),
         DialogInt("resolution", "Resolution", default=7, min=1, max=60),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("radius",
                     "Radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0),
     ]
Exemple #12
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("h",
                     "Coefficient 'H'",
                     default=0.01,
                     min=.001,
                     max=.05),
         DialogFloat("a", "Coefficient 'A'", default=10.0, min=.5,
                     max=45.0),
         DialogFloat("b", "Coefficient 'B'", default=28.0, min=.5,
                     max=45.0),
         DialogFloat("c",
                     "Coefficient 'C'",
                     default=8.0 / 3.0,
                     min=.1,
                     max=5.0),
         DialogInt("points", "Number of points", default=5000),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]
Exemple #13
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("wHeight",
                     "Wave Height",
                     units=units,
                     default=inchesToUnits(1.0, units),
                     min=0.0,
                     max=length),
         DialogInt("lines", "Lines", default=40, min=5, max=100),
         DialogInt("xCount",
                   "Points per line",
                   default=100,
                   min=10,
                   max=160),
         DialogFloat("waves",
                     "Waves per Line",
                     default=3.0,
                     min=0.0,
                     max=45.0),
         DialogFloat("shift",
                     "Shift per Line",
                     units="degrees",
                     default=5.0,
                     min=0.0,
                     max=10.0),
         DialogFloat("increment",
                     "Wave increment",
                     units="percent",
                     default=100.0,
                     min=95.0,
                     max=105.0),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]
Exemple #14
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     rippleSize = min(width, length) * .05
     radius = max(width, length) / 2.0
     self.editor = [
         DialogInt("rays", "Ray count", default=12, min=1, max=60),
         DialogInt("rayWidth",
                   "Ray width",
                   units="degrees",
                   default=10,
                   min=1,
                   max=60),
         DialogFloat("ripples",
                     "Number of ripples",
                     default=2.0,
                     min=0.0,
                     max=20.0),
         DialogFloat("rippleSize",
                     "Size of ripples",
                     units=units,
                     default=rippleSize,
                     min=0.,
                     max=3 * rippleSize),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     default=2.0,
                     min=0.0,
                     max=radius),
         DialogFloat("outerRadius",
                     "Outer radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0,
                     max=radius),
     ]
Exemple #15
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("majorFreq",
                     "Major frequency",
                     units="per rotation",
                     default=3.0,
                     min=0.0,
                     max=179.0,
                     randRange=(0.1, 20.)),
         DialogFloat("majorAmp",
                     "Major amplitude",
                     units=units,
                     default=inchesToUnits(4.0, units),
                     min=0.0,
                     max=inchesToUnits(6.0, units)),
         DialogFloat("minorFreq",
                     "Minor frequency mod",
                     units="percent",
                     default=.01,
                     min=-0.03,
                     max=.03),
         DialogFloat("minorAmp",
                     "Minor amplitude",
                     units="degrees",
                     default=20.0,
                     min=0.0,
                     max=45.0),
         DialogBreak(),
         DialogFloat("r1",
                     "Radius start",
                     units=units,
                     default=1.0,
                     min=0.0,
                     max=max(width, length) * .9),
         DialogFloat("r2",
                     "Radius end",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0,
                     max=max(width, length) * 1.5),
         DialogFloat("turns", "Turns", default=20.0, min=0.1, max=80),
         DialogInt("angleRate",
                   "Sample rate",
                   units="degrees",
                   default=5,
                   min=1,
                   max=10),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Exemple #16
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogInt("points", "Points", min=3, max=75, default=5),
         DialogFloat("innerRadius1",
                     "Inner radius 1",
                     units=units,
                     default=inchesToUnits(3.0, units),
                     min=1.0,
                     max=max(width, length) / 2),
         DialogFloat("outerRadius1",
                     "Outer radius 1",
                     units=units,
                     default=min(width, length) / 2,
                     min=2.0,
                     max=max(width, length) / 2),
         DialogFloat("innerRadius2",
                     "Inner radius 2",
                     units=units,
                     default=0.0),
         DialogFloat("outerRadius2",
                     "Outer radius 2",
                     units=units,
                     default=inchesToUnits(5.0, units)),
         DialogFloat("angleStart", "Starting angle", units="degrees"),
         DialogFloat("angleShift",
                     "Shift angle",
                     units="degrees",
                     default=0.0,
                     min=0.0,
                     max=15.0),
         DialogInt("steps", "Number of stars", default=5, min=0, max=40),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Exemple #17
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogStr("expression",
                   "Expression",
                   default='cos( 3.*radians( sqrt(x*x+y*y )))',
                   length=45),
         DialogFloat("xStart", "X Start", default=-180.0),
         DialogFloat("xEnd", "X End", default=180.0),
         DialogInt("xPoints", "X Points", default=45, min=2, max=180),
         DialogFloat("yStart", "Y Start", default=-180.0),
         DialogFloat("yEnd", "Y End", default=180.0),
         DialogInt("yPoints", "Y Points", default=45, min=2, max=180),
         DialogFloat("zScale", "Z Scale", default=1.0, min=0.01, max=10.0),
         DialogFloat("xyAngle",
                     "Horizontal Rotation",
                     units="degrees",
                     default=45.0,
                     min=-45.0,
                     max=45.0),
         DialogFloat("yzAngle",
                     "Vertical Tilt",
                     units="degrees",
                     default=45.0,
                     min=0.0,
                     max=90.0),
         DialogFloat("zoom", "Zoom", default=1.0, min=0.25, max=10.0),
         DialogYesNo("topDown", "Top Down", default=True),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width * 4),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length * 4),
     ]
Exemple #18
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("depth", "Depth of fractility", default=8, min=1,
                   max=14),
         DialogYesNo("fit", "Auto-fit to table", default=False),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Exemple #19
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("columns",
                   "Columns",
                   default=int(width / (ballSize * 1.25)),
                   min=3,
                   max=int(width / ballSize)),
         DialogInt("rows",
                   "Rows",
                   default=int(length / (ballSize * 1.25)),
                   min=3,
                   max=int(length / ballSize)),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000.0,
                   rbutton=True),
         DialogBreak(),
         DialogFloat("width",
                     "Width",
                     default=width,
                     units=units,
                     min=1.0,
                     max=width),
         DialogFloat("length",
                     "Length",
                     default=length,
                     units="units",
                     min=1.0,
                     max=length),
         DialogFloat("xOffset",
                     "Starting x location",
                     default=0.0,
                     units=units),
         DialogFloat("yOffset",
                     "Starting y location",
                     default=0.0,
                     units=units),
     ]
Exemple #20
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     radius = min(width, length) / 2.0
     mRadius = max(width, length) / 2.0
     self.editor = [
         DialogInt("cwArms", "CW arms", default=12, min=1, max=120),
         DialogFloat("cwAngular",
                     "CW angular distance",
                     default=30.0,
                     units="degrees"),
         DialogInt("ccwArms", "CCW arms", default=12, min=1, max=120),
         DialogFloat("ccwAngular",
                     "CCW angular distance",
                     default=30.0,
                     units="degrees"),
         DialogInt("points", "Points per arm", default=10, min=2),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     default=radius * 0.15,
                     min=0.0,
                     max=mRadius),
         DialogFloat("outerRadius",
                     "Outer radius",
                     units=units,
                     default=radius,
                     min=1.0,
                     max=mRadius),
     ]
Exemple #21
0
 def __init__(self, width, length, ballSize, units):
     self.ballSize = ballSize
     rockSize = inchesToUnits(3, units)
     self.editor = [
         DialogInt("rocks", "Number of rocks", default=5, min=1, max=25),
         DialogFloat("minRockSize",
                     "Minimum rock size",
                     units=units,
                     min=inchesToUnits(.25, units),
                     max=rockSize,
                     default=inchesToUnits(1.0, units)),
         DialogFloat("maxRockSize",
                     "Maximum rock size",
                     units=units,
                     min=inchesToUnits(.25, units),
                     max=rockSize,
                     default=inchesToUnits(1.0, units)),
         DialogInt("rakeSize",
                   "Rake teeth",
                   units="tines",
                   min=2,
                   max=5,
                   default=3),
         DialogInt("seed",
                   "Random Seed",
                   default=1,
                   min=0,
                   max=10000,
                   rbutton=True),
         DialogBreak(),
         DialogFloat("ballSize",
                     "Ball size",
                     units=units,
                     min=.25,
                     default=ballSize),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Exemple #22
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     radius = min(width, length) / 2.0
     mRadius = max(width, length) / 2.0
     self.editor = [
         DialogFloat("petals", "Petals", default=7.0, min=0.001, max=45.0),
         DialogFloat("angleStart",
                     "Starting angle",
                     units="degrees",
                     min=-180.,
                     max=180.),
         DialogFloat("angleShift",
                     "Shift angle",
                     units="degrees",
                     default=0.0,
                     min=-10.0,
                     max=10.0),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=3.0,
                     min=1.0,
                     max=10.0),
         DialogInt("turns",
                   "Turns",
                   default=20,
                   min=1,
                   max=int(mRadius / ballSize * 4)),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     default=radius * .15,
                     min=0.0,
                     max=mRadius),
         DialogFloat("outerRadius",
                     "Outer radius",
                     units=units,
                     default=radius,
                     min=1.0,
                     max=mRadius),
     ]
Exemple #23
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("xSquares", "Columns (X)", default=2, min=1, max=40),
         DialogInt("ySquares", "Rows (Y)", default=2, min=1, max=40),
         DialogInt("xLines", "X Fill Lines", default=4, min=1, max=16),
         DialogInt("yLines", "Y Fill Lines", default=4, min=1, max=16),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length),
     ]
Exemple #24
0
 def __init__(self, cols, rows):
     pal = list(palettes.keys())[random.randint(0, len(palettes) - 1)]
     self.editor = [
         DialogList("palette",
                    "Palette",
                    default=pal,
                    list=sorted(palettes.keys())),
         DialogInt(
             "dots",
             "Number of Dots",
             default=20,
             min=1,
             max=(cols + rows) * 2,
         ),
     ]
Exemple #25
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("decay",           "Decay Rate",           default=0.0001, min=.00000001),
         DialogInt("steps",           "Number of Steps",      default=1000, min=1000, max=20000),
         DialogFloat("f1",              "X1 Frequency",         default=5.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("f2",              "X2 Frequency",         default=10.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("f3",              "Y1 Frequency",         default=7.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("f4",              "Y2 Frequency",         default=12.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("a1",              "X1 Amplitude",         units=units, default=width / 4.0, min=0.0),
         DialogFloat("a2",              "X2 Amplitude",         units=units, default=width / 4.0, min=0.0),
         DialogFloat("a3",              "Y1 Amplitude",         units=units, default=length / 4.0, min=0.0),
         DialogFloat("a4",              "Y2 Amplitude",         units=units, default=length / 4.0, min=0.0),
         DialogFloat("p1",              "X1 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogFloat("p2",              "X2 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogFloat("p3",              "Y1 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogFloat("p4",              "Y2 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogBreak(),
         DialogFloat("xCenter",         "X Center",             units=units, default=width / 2.0),
         DialogFloat("yCenter",         "Y Center",             units=units, default=length / 2.0),
     ]
Exemple #26
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogMulti("text", "Text", default="Text"),
         DialogFont(
             "font",
             "Font",
             default='/usr/share/fonts/truetype/msttcorefonts/Arial.ttf'),
         DialogFloat("cHeight",
                     "Height",
                     units=units,
                     default=inchesToUnits(4.0, units),
                     min=inchesToUnits(1.0, units),
                     max=length,
                     step=inchesToUnits(.5, units)),
         DialogFloat("lineSpacing",
                     "Line Spacing",
                     default=1.0,
                     min=1.0,
                     max=2.0,
                     step=.25),
         DialogInt("rotate",
                   "Rotation Angle",
                   units="degrees",
                   default=0.,
                   min=-180,
                   max=180),
         DialogList("origin",
                    "Origin",
                    list=['BottomLeft', 'Center'],
                    default='Center'),
         DialogFloat("xOffset",
                     "X Origin",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yOffset",
                     "Y Origin",
                     units=units,
                     default=length / 2.0),
     ]
Exemple #27
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("radius",
                     "Starting Radius",
                     units=units,
                     default=min(width, length) / 2.,
                     min=3.,
                     max=max(width, length)),
         DialogFloat("angle",
                     "Phyllotaxic Angle",
                     units="degrees",
                     default=137.51,
                     min=1,
                     max=180.0),
         DialogFloat("reductionRate",
                     "Reduction Rate",
                     default=0.976,
                     min=.85,
                     max=.99),
         DialogFloat("petalWidth",
                     "Petal Width",
                     units="degrees",
                     default=15.,
                     min=5.,
                     max=90.),
         DialogInt("iterations", "Iterations", default=100, min=1, max=500),
         DialogYesNo("round", "Rounded edges", default=False),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Exemple #28
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFile("filename",
                    "File Name",
                    default=CLIPART_PATH,
                    filter='.dxf'),
         DialogInt("iterations",
                   "Number of Fill Iterations",
                   default=0,
                   min=0,
                   max=60),
         DialogFloat("decrement",
                     "Fill Decrement",
                     units=units,
                     default=0.5,
                     min=0.0,
                     max=inchesToUnits(2.0, units)),
         DialogFloat("ballSize",
                     "Ball Size",
                     units=units,
                     default=ballSize,
                     min=inchesToUnits(0.25, units)),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width (x)",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width * 2),
         DialogFloat("length",
                     "Length (y)",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length * 2),
     ]
Exemple #29
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("repetitions", "Repetitions", default=3, min=1, max=20),
         DialogFloat("heading",
                     "Initial heading",
                     units="degrees",
                     default=0.0),
         DialogFloat("angle", "Angle", units="degrees", default=90.0),
         DialogYesNo("round", "Rounded edges", default=False),
         DialogBreak(),
         DialogStr("axiom", "Axiom", length=30),
         DialogStr("rule1", "Rule 1", length=30),
         DialogStr("rule2", "Rule 2", length=30),
         DialogStr("rule3", "Rule 3", length=30),
         DialogStr("rule4", "Rule 4", length=30),
         DialogStr("rule5", "Rule 5", length=30),
         DialogStr("rule6", "Rule 6", length=30),
         DialogBreak(),
         DialogFloat("xOrigin", "X Origin", units=units, default=0.0),
         DialogFloat("yOrigin", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width", units=units, default=width),
         DialogFloat("length", "Length", units=units, default=length),
     ]
     self.MAX_LEN = 50000
Exemple #30
0
 def __init__(self, width, length, ballSize, units):
     radius = min(width, length) * .1
     self.editor = [
         DialogFloat("radius",
                     "Radius",
                     units=units,
                     default=radius,
                     min=1.0,
                     max=radius * 4),
         DialogInt("rings", "Rings", default=3, min=1, max=8),
         DialogFloat("turns", "Turns", default=3, min=0.1, max=24.0),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=15.0,
                     min=-720.0,
                     max=720.0),
         DialogFloat("factor",
                     "Spacing factor",
                     default=1.0,
                     min=.5,
                     max=1.5),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0,
                     min=0.0,
                     max=width),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0,
                     min=0.0,
                     max=length),
     ]