Demo: VoxelCAD Csongor Kiss, Toby Shaw What is VoxelCAD? - - PowerPoint PPT Presentation

demo voxelcad
SMART_READER_LITE
LIVE PREVIEW

Demo: VoxelCAD Csongor Kiss, Toby Shaw What is VoxelCAD? - - PowerPoint PPT Presentation

Demo: VoxelCAD Csongor Kiss, Toby Shaw What is VoxelCAD? Collaborative voxel-based CAD tool In the browser Programmable with a functional DSL Written in Elm + Haskell (+ TypeScript) Work in progress Some context


slide-1
SLIDE 1

Demo: VoxelCAD

Csongor Kiss, Toby Shaw

slide-2
SLIDE 2

What is VoxelCAD?

  • Collaborative voxel-based CAD tool
  • In the browser
  • Programmable with a functional DSL
  • Written in Elm + Haskell (+ TypeScript)
  • Work in progress
slide-3
SLIDE 3

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
slide-4
SLIDE 4
slide-5
SLIDE 5

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
slide-6
SLIDE 6

Functional DSL

  • Pure - no global state, idempotent scripts
  • Nicely composes
  • Easy to understand, even without programming

knowledge

  • “We’ll write a parser later” => lisp
slide-7
SLIDE 7

DEMO

slide-8
SLIDE 8

Constructive Solid Geometry

type Primitive = Cylinder | Sphere | Cube | Cone

slide-9
SLIDE 9

type Op = Union | Intersect | Subtract

Combine primitive solids with boolean operations

slide-10
SLIDE 10

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

slide-11
SLIDE 11

Voxelisation

slide-12
SLIDE 12

Hardware-accelerated voxelisation

slide-13
SLIDE 13
slide-14
SLIDE 14

A LONGER DEMO

slide-15
SLIDE 15

Thoughts on Elm

  • New programming language for web applications
  • Similar to Haskell
  • But there are some inconvenient differences
  • Predictable run-time system
slide-16
SLIDE 16

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

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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!

slide-19
SLIDE 19

Thank you