Skip to content

Commit

Permalink
renaming / refactoring doc structure
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdmiller committed Jan 4, 2025
1 parent 1171a70 commit 104d701
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/how-to-multiple-objects.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# How-to: Map multiple objects

TODO
2 changes: 2 additions & 0 deletions docs/how-to-multiple-projectors.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# How-to: Use multiple projectors

TODO
1 change: 0 additions & 1 deletion docs/how-to-paper-folding.md

This file was deleted.

21 changes: 13 additions & 8 deletions docs/getting-started.md → docs/tutorial-getting-started.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Getting started
# Tutorial: Getting started

## Installation

Expand All @@ -13,30 +13,35 @@

Installing via the Contributions Manager is not yet currently available.

## Code
## Find an object

In order to use Shape Mapper, you must have a physical object that you want to projection map, and you must model that object virtually (whether through code or through 3D modeling software like [Blender](https://www.blender.org/)).

To get started quickly, we can use a box-shaped object. In this example, we'll be using a cardboard box, but a book or boxy piece of furniture could also work.

[picture of box]

1. In order to model our box in code, we'll need to measure the size of the physical box. Our box is [measurements].
In order to model our box in code, we'll need to measure the size of the physical box. Our box is [measurements].

[picture of measuring]

## Write code

1. Create a new Processing sketch and import the Shape Mapper library, as well as the Processing [PShape](https://processing.org/tutorials/pshape) class:

```
import spacefiller.shapemapper.ShapeMapper;
import processing.core.PShape;
```
1. Create two top level variables to store the Shape Mapper library object and the shape that we'll be mapping:
2. Create two top level variables to store the Shape Mapper library object and the shape that we'll be mapping:
```
ShapeMapper mapper;
PShape shape;
```
1. Write a setup function that initializes the shape and the Shape Mapper library. When initializing the screen size, it is recommended to use [`fullScreen()`](https://processing.org/reference/fullScreen_.html). It is required to use the [`P3D` render mode](https://processing.org/tutorials/p3d); Shape Mapper will not work without it.
3. Write a setup function that initializes the shape and the Shape Mapper library. When initializing the screen size, it is recommended to use [`fullScreen()`](https://processing.org/reference/fullScreen_.html). It is required to use the [`P3D` render mode](https://processing.org/tutorials/p3d); Shape Mapper will not work without it.
``` java
void setup() {
Expand All @@ -50,7 +55,7 @@ To get started quickly, we can use a box-shaped object. In this example, we'll b
}
```
1. Next, we'll write a simple draw function that renders an outline of the box. To map our rendered geometry to the physical box, we'll need to sandwich the drawing code within the `mapper.beginMapping()` and `mapper.endMapping()` lines.
4. Next, we'll write a simple draw function that renders an outline of the box. To map our rendered geometry to the physical box, we'll need to sandwich the drawing code within the `mapper.beginMapping()` and `mapper.endMapping()` lines.
``` java
void draw() {
Expand All @@ -71,7 +76,7 @@ To get started quickly, we can use a box-shaped object. In this example, we'll b
}
```
1. Putting it all together, our sketch should look like this:
5. Putting it all together, our sketch should look like this:
``` java
import spacefiller.shapemapper.ShapeMapper;
Expand Down Expand Up @@ -104,7 +109,7 @@ To get started quickly, we can use a box-shaped object. In this example, we'll b
}
```
## Calibration
## Map object
Now that we have the code for the sketch set up, we can calibrate our mapping.
Expand Down
3 changes: 3 additions & 0 deletions docs/tutorial-paper-folding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Tutorial: Map a paper-folded object

TODO
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins:

nav:
- Home: index.md
- Get Started: getting-started.md
- 'Tutorial: How to map a paper-folded object': how-to-paper-folding.md
- 'Tutorial: Getting started': tutorial-getting-started.md
- 'Tutorial: Map a paper-folded object': tutorial-paper-folding.md
- 'How-to: Map multiple objects': how-to-multiple-objects.md
- 'How-to: Use multiple projectors': how-to-multiple-projectors.md

Expand Down

0 comments on commit 104d701

Please sign in to comment.