Ejemplo n.º 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)]
Ejemplo n.º 2
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),
     ]
Ejemplo n.º 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),
     ]
Ejemplo n.º 4
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),
     ]
Ejemplo n.º 5
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
Ejemplo n.º 6
0
 def __init__(self, cols, rows):
     self.cols = cols
     self.rows = rows
     self.editor = [
         DialogFloat("xOffset",
                     "X Center",
                     units="inches",
                     default=TABLE_WIDTH / 2,
                     min=0.0,
                     max=TABLE_WIDTH),
         DialogFloat("yOffset",
                     "Y Center",
                     units="inches",
                     default=TABLE_LENGTH / 4,
                     min=0.0,
                     max=TABLE_LENGTH),
         DialogFloat("angleRate",
                     "Angle Rate",
                     units="degrees",
                     default=5.0,
                     min=1.0,
                     max=30.0),
         DialogFloat("beamWidth",
                     "Beam Width",
                     units="degrees",
                     default=30.0,
                     min=4.0,
                     max=90.0),
         DialogColor("color", "Color", default=(255, 255, 255)),
     ]
Ejemplo n.º 7
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),
     ]
Ejemplo n.º 8
0
    def __init__(self, width, length, ballSize, units):
        try:
            with mach.mach() as e:
                x, y = e.getStatus()['pos']
        except Exception:
            x, y = 0., 0.

        self.editor = [
            DialogFloat("xOffset",         "X Origin",                 units=units, default=x),
            DialogFloat("yOffset",         "Y Origin",                 units=units, default=y),
        ]
Ejemplo n.º 9
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),
     ]
Ejemplo n.º 10
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("sHeight",
                     "Shingle Height",
                     units=units,
                     default=inchesToUnits(2, units),
                     min=inchesToUnits(0.1, units),
                     max=inchesToUnits(5, 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),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Ejemplo n.º 11
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),
     ]
Ejemplo n.º 12
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)),
     ]
Ejemplo n.º 13
0
 def __init__(self, cols, rows):
     self.cols = cols
     self.rows = rows
     self.editor = [
         DialogFloat("wpm",
                     "Wave Frequency",
                     units="per minute",
                     default=30.0,
                     min=0.1,
                     max=90.0),
         DialogFloat("roughness",
                     "Water Roughness",
                     units="percent",
                     default=40.0,
                     min=0.0,
                     max=100.0),
     ]
Ejemplo n.º 14
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),
     ]
Ejemplo n.º 15
0
 def __init__(self, cols, rows):
     self.cols = cols
     self.rows = rows
     self.patterns = [c for c in ledPatterns if c not in ['Random', 'Off']]
     self.editor = [
         DialogFloat("minutes",
                     "Light Pattern Change Frequency",
                     units="minutes",
                     default=1.0,
                     min=0.25,
                     max=10.0),
     ]
Ejemplo n.º 16
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),
     ]
Ejemplo n.º 17
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("xSpacing",
                     "X Spacing (0 for none)",
                     units=units,
                     default=0.0,
                     min=0.,
                     max=width),
         DialogFloat("ySpacing",
                     "Y Spacing (0 for none)",
                     units=units,
                     default=ballSize,
                     min=0.,
                     max=length),
         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),
     ]
Ejemplo n.º 18
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("radius",
                     "Radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0,
                     max=max(width, length) * 2.0),
         DialogFloat("turns", "Turns", default=10.0, min=.1, max=200.0),
         DialogFloat("angleStart", "Starting angle", units="degrees"),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     min=1,
                     default=5.0),
         DialogYesNo("fill", "Fill", default=False),
         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),
     ]
Ejemplo n.º 19
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),
     ]
Ejemplo n.º 20
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),
     ]
Ejemplo n.º 21
0
    def __init__(self, width, length, ballSize, units):
        self.ballSize = ballSize
        self.multiplier = min(width, length) / 2.
        self.xc, self.yc = width / 2, length / 2
        self.fullRadius = sqrt(max(width, length)**2)

        self.backgrounds = ['None', 'Spiral', "Full Spiral"]

        self.editor = [
            DialogFile("filename",            "File Name",                default=THR_PATH, filter='.thr'),
            DialogFloat("rotation",            "Rotation",                units='Degrees', default=0, min=-360., max=360.),
            DialogList("background",          "Background",               default='None', list=self.backgrounds),
        ]
Ejemplo n.º 22
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)),
     ]
Ejemplo n.º 23
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),
     ]
Ejemplo n.º 24
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         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),
         DialogFloat("turns", "Turns", default=10., min=0.1, max=100.),
         DialogFloat("angleStart",
                     "Starting angle",
                     units="degrees",
                     min=0.0,
                     max=360.0,
                     step=15.),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=15.0,
                     min=-180.0,
                     max=180.0),
         DialogFloat("base",
                     "Growth base power",
                     default=1.0,
                     min=0.25,
                     max=10.0),
         DialogYesNo("fill", "Fill in spiral"),
         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),
     ]
Ejemplo n.º 25
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),
     ]
Ejemplo n.º 26
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     min=0.0,
                     max=min(width, length) / 2.),
         DialogFloat("turns", "Turns", default=5., min=1.0, max=50.0),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=11.0,
                     min=1,
                     max=45.0),
         DialogFloat("curveFactor",
                     "Curve factor",
                     default=1.,
                     min=-6.,
                     max=6.),
         DialogFloat("scaleFactor",
                     "Scale factor",
                     default=1.,
                     min=.01,
                     max=10.0),
         DialogFloat("logGrowth",
                     "Logarithmic growth",
                     units="percent",
                     default=0.,
                     min=0.,
                     max=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),
     ]
     self.maxRadius = 2. * sqrt(width**2 + length**2)
Ejemplo n.º 27
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),
     ]
Ejemplo n.º 28
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),
     ]
Ejemplo n.º 29
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),
     ]
Ejemplo n.º 30
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("aFreq",
                     "A Frequency",
                     default=8.0,
                     min=0.001,
                     max=100.0,
                     rRound=0),
         DialogFloat("bFreq",
                     "B Frequency",
                     default=9.0,
                     min=0.001,
                     max=100.0,
                     rRound=0),
         DialogFloat("delta", "Delta", units="degrees", default=0.0),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("width",
                     "Width (x)",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length (y)",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]