GeoLIPI: DSL for implicit geometric modelling
GeoLIPI is a language for modelling 3D shapes. This is to be treated as a meta-language, from which visual programming languages can be derived. Some of the languages/visual programs that can be executed in this framework are:
CSG 3D Variants
GeoCode
SVG 2D
and many more. Check out languages.md for more details.
Main usecase
Mainly, GeoLIPI attempts to embed a generic visual language in python, making it easier to use and extend for research. Additionally, it provides the following benefits:
Fast Batched Execution of programs - useful for training neural networks on large batches of program executions.
Single “symbolic” object, multiple execution strategies. This helps with “executing” the program in different platforms/systems (such as blender for rendering, and pytorch for optimization).
Parameter Optimization of arbitrary visual programs (All operations are created to allow differentiable optimization of its parameters).
[TBD] Help with searching programs for a desired execution (refer to our recent [paper](https://bardofcodes.github.io/coref/)).
Batched PyTorch execution code for all the shader toy 2D and 3D primitives described by Inigo Quilez.
Indices and tables
Contents
- GeoLIPI Introduction
- Installation Guide
- Visual Languages in GeoLIPI
- geolipi
- geometry_nodes package
- Submodules
- geometry_nodes.bl_utils module
- geometry_nodes.evaluate_graph module
- geometry_nodes.geonodes module
create_boolean_difference_node_seq()
create_boolean_intersection_node_seq()
create_boolean_join_node_seq()
create_boolean_union_node_seq()
create_cuboid_node_seq()
create_cylinder_node_seq()
create_geonode_tree()
create_prebaked_primitive_node_seq()
create_reflect_node_seq()
create_sphere_node_seq()
create_transform_node_seq()
- geometry_nodes.materials module
- geometry_nodes.utils module
- symbolic package
get_cmd_mapper()
- Submodules
- symbolic.base_symbolic module
- symbolic.color module
- symbolic.combinators module
- symbolic.common module
- symbolic.primitives_2d module
Arc2D
BlobbyCross2D
Box2D
Circle2D
CircleWave2D
CoolS2D
Cross2D
CutDisk2D
Egg2D
Ellipse2D
EquilateralTriangle2D
Heart2D
Hexagram2D
HorseShoe2D
Hyperbola2D
IsoscelesTriangle2D
Moon2D
NoParamCircle2D
NoParamRectangle2D
NoParamTriangle2D
NullExpression2D
OrientedBox2D
OrientedVesica2D
Parabola2D
ParabolaSegment2D
Parallelogram2D
Pie2D
Polygon2D
Primitive2D
QuadraticBezierCurve2D
QuadraticCircle2D
Rectangle2D
RegularHexagon2D
RegularPentagon2D
RegularStar2D
Rhombus2D
RoundedBox2D
RoundedCross2D
RoundedX2D
Segment2D
Stairs2D
Star2D
Trapezoid2D
Triangle2D
Tunnel2D
UnevenCapsule2D
Vesica2D
- symbolic.primitives_3d module
ArbitraryCappedCone
ArbitraryCappedCylinder3D
ArbitraryRoundCone3D
Box3D
BoxFrame3D
CappedCone3D
CappedCylinder3D
CappedTorus3D
Capsule3D
Cone3D
Cuboid3D
CutHollowSphere
CutSphere3D
Cylinder3D
DeathStar3D
HexPrism3D
InexactAnisotropicGaussian3D
InexactCone3D
InexactEllipsoid3D
InexactOctahedron3D
InexactSuperQuadrics3D
InfiniteCone3D
InfiniteCylinder3D
Link3D
NoParamCuboid3D
NoParamCylinder3D
NoParamSphere3D
NullExpression3D
Octahedron3D
Plane3D
PreBakedPrimitive3D
Primitive3D
Pyramid3D
Quadrilateral3D
RevolvedVesica3D
Rhombus3D
RoundCone3D
RoundedBox3D
RoundedCylinder3D
SolidAngle3D
Sphere3D
Torus3D
TriPrism3D
Triangle3D
VerticalCappedCylinder3D
VerticalCapsule3D
- symbolic.primitives_higher module
- symbolic.reference module
- symbolic.resolve module
- symbolic.transforms_2d module
AxialReflect2D
AxialScaleSymmetry2D
AxialTranslationSymmetry2D
Dilate2D
Distort2D
Erode2D
EulerRotate2D
Macro2D
Modifier2D
Onion2D
PositionalTransform2D
Reflect2D
ReflectCoords2D
ReflectX2D
ReflectY2D
RotationSymmetry2D
SDFModifier2D
Scale2D
ScaleSymmetry2D
Shear2D
Transform2D
Translate2D
TranslationSymmetry2D
TranslationSymmetryX2D
TranslationSymmetryY2D
- symbolic.transforms_3d module
AxialReflect3D
AxialRotationSymmetry3D
AxialScaleSymmetry3D
AxialTranslationSymmetry3D
Bend3D
Dilate3D
Distort3D
Erode3D
EulerRotate3D
Macro3D
Modifier3D
Onion3D
PositionalTransform3D
QuaternionRotate3D
Reflect3D
ReflectCoords3D
ReflectX3D
ReflectY3D
ReflectZ3D
Rotate5D
Rotate6D
Rotate9D
RotationSymmetry3D
RotationSymmetryX3D
RotationSymmetryY3D
RotationSymmetryZ3D
SDFModifier3D
Scale3D
ScaleSymmetry3D
Shear3D
Transform3D
Translate3D
TranslationSymmetry3D
TranslationSymmetryX3D
TranslationSymmetryY3D
TranslationSymmetryZ3D
Twist3D
- symbolic.types module
- torch_compute package
- Submodules
- torch_compute.batch_evaluate_sdf module
- torch_compute.color_functions module
- torch_compute.common module
- torch_compute.compile_expression module
- torch_compute.evaluate_expression module
- torch_compute.sdf_functions_2d module
ndot()
sdf2d_arc()
sdf2d_blobby_cross()
sdf2d_box()
sdf2d_circle()
sdf2d_circle_wave()
sdf2d_cool_s()
sdf2d_cross()
sdf2d_cut_disk()
sdf2d_egg()
sdf2d_ellipse()
sdf2d_equilateral_triangle()
sdf2d_heart()
sdf2d_hexagram()
sdf2d_horse_shoe()
sdf2d_hyperbola()
sdf2d_isosceles_triangle()
sdf2d_moon()
sdf2d_no_param_circle()
sdf2d_no_param_rectangle()
sdf2d_no_param_triangle()
sdf2d_oriented_box()
sdf2d_oriented_vesica()
sdf2d_parabola()
sdf2d_parabola_segment()
sdf2d_parallelogram()
sdf2d_pie()
sdf2d_polygon()
sdf2d_quadratic_bezier_curve()
sdf2d_quadratic_circle()
sdf2d_regular_hexagon()
sdf2d_regular_octagon()
sdf2d_regular_pentagon()
sdf2d_regular_star()
sdf2d_rhombus()
sdf2d_rounded_box()
sdf2d_rounded_cross()
sdf2d_rounded_x()
sdf2d_segment()
sdf2d_stairs()
sdf2d_star_5()
sdf2d_trapezoid()
sdf2d_triangle()
sdf2d_tunnel()
sdf2d_uneven_capsule()
sdf2d_vesica()
- torch_compute.sdf_functions_3d module
sdf3d_arbitrary_capped_cone()
sdf3d_arbitrary_capped_cylinder()
sdf3d_arbitrary_round_cone()
sdf3d_box()
sdf3d_box_frame()
sdf3d_capped_cone()
sdf3d_capped_cylinder()
sdf3d_capped_torus()
sdf3d_capsule()
sdf3d_cone()
sdf3d_cut_hollow_sphere()
sdf3d_cut_sphere()
sdf3d_death_star()
sdf3d_hex_prism()
sdf3d_inexact_anisotropic_gaussian()
sdf3d_inexact_cone()
sdf3d_inexact_ellipsoid()
sdf3d_inexact_octahedron()
sdf3d_inexact_super_quadrics()
sdf3d_infinite_cone()
sdf3d_infinite_cylinder()
sdf3d_link()
sdf3d_no_param_cuboid()
sdf3d_no_param_cylinder()
sdf3d_no_param_sphere()
sdf3d_octahedron()
sdf3d_plane()
sdf3d_pyramid()
sdf3d_quadrilateral()
sdf3d_revolved_vesica()
sdf3d_rhombus()
sdf3d_round_cone()
sdf3d_rounded_box()
sdf3d_rounded_cylinder()
sdf3d_solid_angle()
sdf3d_sphere()
sdf3d_torus()
sdf3d_tri_prism()
sdf3d_triangle()
sdf3d_vertical_capped_cylinder()
sdf3d_vertical_capsule()
- torch_compute.sdf_functions_higher module
- torch_compute.sdf_operators module
- torch_compute.sketcher module
Sketcher
Sketcher.device
Sketcher.dtype
Sketcher.resolution
Sketcher.mode
Sketcher.n_dims
Sketcher.coord_scale
Sketcher.homogeneous_identity
Sketcher.zero_mat
Sketcher.coords
Sketcher.scale_identity
Sketcher.translate_identity
Sketcher.create_coords()
Sketcher.empty_sdf()
Sketcher.get_affine_identity()
Sketcher.get_base_coords()
Sketcher.get_color_canvas()
Sketcher.get_coords()
Sketcher.get_homogenous_coords()
Sketcher.get_scale_identity()
Sketcher.get_translate_identity()
Sketcher.make_homogenous_coords()
- torch_compute.sphere_marcher module
Renderer
Renderer.dtype
Renderer.device
Renderer.resolution
Renderer.camera_params
Renderer.light_setting
Renderer.num_iterations
Renderer.convergence_threshold
Renderer.sketcher
Renderer.recursive_evaluator
Renderer.secondary_sketcher
Renderer.compile_expression
Renderer.create_ground_expr()
Renderer.get_camera_matrix()
Renderer.get_camera_position()
Renderer.get_camera_rotation()
Renderer.get_rays()
Renderer.make_random_material()
Renderer.render()
compute_normal()
compute_shadows()
phong_shading()
render_expression()
sphere_tracing()
- torch_compute.transforms module
get_affine_reflection_2D()
get_affine_reflection_3D()
get_affine_rotate_2D()
get_affine_rotate_euler_3D()
get_affine_scale_2D()
get_affine_scale_3D()
get_affine_shear_2D()
get_affine_shear_3D()
get_affine_translate_2D()
get_affine_translate_3D()
position_cheap_bend()
position_distort()
position_twist()
- torch_compute.utils module
- torch_compute.visualizer module
- geometry_nodes package