voxelcad · some context • people use minecraft as an artistic canvas • these tend to get very...

19
Demo: VoxelCAD Csongor Kiss, Toby Shaw

Upload: others

Post on 03-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Demo: VoxelCADCsongor Kiss, Toby Shaw

Page 2: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

What is VoxelCAD?• Collaborative voxel-based CAD tool

• In the browser

• Programmable with a functional DSL

• Written in Elm + Haskell (+ TypeScript)

• Work in progress

Page 3: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Some context

• People use Minecraft as an artistic canvas

• These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow- no immediate feedback

Page 4: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no
Page 5: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Some context

• People use Minecraft as an artistic canvas

• These tend to get very big

• There are some tools, but they are not very intuitive: - clunky - slow- no immediate feedback

Page 6: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Functional DSL

• Pure - no global state, idempotent scripts

• Nicely composes

• Easy to understand, even without programming knowledge

• “We’ll write a parser later” => lisp

Page 7: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

DEMO

Page 8: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Constructive Solid Geometry

type Primitive = Cylinder | Sphere | Cube | Cone

Page 9: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

type Op= Union| Intersect| Subtract

Combine primitive solids with boolean operations

Page 10: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

type Construction = Leaf Transform Primitive | Combine Transform Op Construction Construction

type Transform = …

Page 11: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Voxelisation

Page 12: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Hardware-accelerated voxelisation

Page 13: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no
Page 14: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

A LONGER DEMO

Page 15: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Thoughts on Elm

• New programming language for web applications

• Similar to Haskell

• But there are some inconvenient differences

• Predictable run-time system

Page 16: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

data Transformation = Scale Vec3 Vec3 | Rotate Float Vec3 Vec3 | Translate Vec3 deriving (Generic, FromJSON, ToJSON)

Page 17: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

data Transformation = Scale Vec3 Vec3 | Rotate Float Vec3 Vec3 | Translate Vec3 deriving (Generic, FromJSON, ToJSON, Elm)

Page 18: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Future work• More usable editor (auto-completion, syntax

highlighting…)

• A typed DSL

• More “mouse-support” (for curve control points, for example)

• Could be used for teaching programming: your program builds things in Minecraft!

Page 19: VoxelCAD · Some context • People use Minecraft as an artistic canvas • These tend to get very big There are some tools, but they are not very intuitive: - clunky - slow - no

Thank you