Fix launch bug for cone.
This commit is contained in:
parent
422f458469
commit
f5f8a6640a
13 changed files with 19 additions and 22 deletions
Binary file not shown.
|
@ -84,33 +84,30 @@ def generate_pendant_shade(shape_parameters):
|
|||
if division_type == "straight":
|
||||
vert.co.x = division_radius*math.sin(theta)
|
||||
vert.co.y = division_radius*math.cos(theta)
|
||||
# elif division_type == "square":
|
||||
# mapped_rad = division_radius + (delta/3.0)**2
|
||||
# vert.co.x = mapped_rad*math.sin(theta)
|
||||
# vert.co.y = mapped_rad*math.cos(theta)
|
||||
elif division_type == "square":
|
||||
mapped_rad = division_radius + (frac)**2
|
||||
vert.co.x = mapped_rad*math.sin(theta)
|
||||
vert.co.y = mapped_rad*math.cos(theta)
|
||||
# elif division_type == "inv_square":
|
||||
# mapped_rad = division_radius + 1.0/(0.01+delta**2)
|
||||
# mapped_rad = division_radius + 1.0/(0.01+frac**2)
|
||||
# vert.co.x = mapped_rad*math.sin(theta)
|
||||
# vert.co.y = mapped_rad*math.cos(theta)
|
||||
else:
|
||||
# elif division_type == "sine":
|
||||
|
||||
elif division_type == "sine":
|
||||
mapped_rad = division_radius + math.sin(math.pi/2.0*frac)
|
||||
vert.co.x = mapped_rad*math.sin(theta)
|
||||
vert.co.y = mapped_rad*math.cos(theta)
|
||||
# elif division_type == "inv_sine":
|
||||
# mapped_rad = division_radius + 1.0/math.sin(delta)
|
||||
# vert.co.x = mapped_rad*math.sin(theta)
|
||||
# vert.co.y = mapped_rad*math.cos(theta)
|
||||
# else:
|
||||
# #elif division_type == "ramp":
|
||||
# mapped_rad = division_radius + delta
|
||||
# vert.co.x = mapped_rad*math.sin(theta)
|
||||
# vert.co.y = mapped_rad*math.cos(theta)
|
||||
# elif division_type == "inv_ramp":
|
||||
# mapped_rad = division_radius + delta
|
||||
# mapped_rad = division_radius + 1.0/math.sin(math.pi/2.0*frac)
|
||||
# vert.co.x = mapped_rad*math.sin(theta)
|
||||
# vert.co.y = mapped_rad*math.cos(theta)
|
||||
elif division_type == "ramp":
|
||||
mapped_rad = division_radius + frac
|
||||
vert.co.x = mapped_rad*math.sin(theta)
|
||||
vert.co.y = mapped_rad*math.cos(theta)
|
||||
elif division_type == "inv_ramp":
|
||||
mapped_rad = division_radius + frac
|
||||
vert.co.x = mapped_rad*math.sin(theta)
|
||||
vert.co.y = mapped_rad*math.cos(theta)
|
||||
|
||||
for face in bm.faces:
|
||||
if UpOrDown(face.normal):
|
||||
|
|
Binary file not shown.
|
@ -45,7 +45,7 @@ def get_random_shape_description(shape, bbox, feature_min):
|
|||
shape_description = copy.deepcopy(_shape_description)
|
||||
shape_description["shape"] = shape
|
||||
|
||||
max_divisions = 3
|
||||
max_divisions = 5
|
||||
num_divisions = int(1 + random.random()*(max_divisions-1))
|
||||
num_divisions = 4
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import sys
|
|||
import random
|
||||
import json
|
||||
import product_gen.generate_product
|
||||
import product_gen.shapes.shape_description as sd
|
||||
import shapes.shape_description as sd
|
||||
from argparse import ArgumentParser
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
{"radius": 0.2561832220044716, "height": 2.088070401902109, "shape": "cone", "color": [0.1, 0.1, 0.1]}
|
||||
{"fixture_radius": 0.3, "division_radii": [0.7366486532785445, 0.8362702452541098, 0.9661599163089211, 0.9867733391465805], "radius": 0.611924774203075, "division_patterns": ["inv_square", "inv_ramp", "sine", "inv_square"], "shape": "cone", "height": 3.7486713335143, "style": "light", "division_offsets": [0.25, 0.25, 0.25, 0.25]}
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 118 KiB |
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
{"shape": "pendant", "style": "dark", "division_patterns": ["ramp", "ramp", "inv_ramp", "inv_sine"], "fixture_radius": 0.3, "height": 4.305539689400392, "radius": 0.8584699492695225, "division_offsets": [0.25, 0.25, 0.25, 0.25], "division_radii": [0.5441324228652892, 0.6530641783849034, 0.7409502304795115, 0.751148488921151]}
|
||||
{"division_offsets": [0.25, 0.25, 0.25, 0.25], "radius": 1.0601818200308606, "shape": "pendant", "height": 4.455460011829081, "style": "billard", "division_patterns": ["sine", "square", "sine", "inv_ramp"], "fixture_radius": 0.3, "division_radii": [0.5868447602079319, 0.596539544538136, 0.7007834420344027, 0.87385109148988]}
|
Binary file not shown.
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
Loading…
Reference in a new issue