# Parametric Vase

Creating a parametric vase is a great way to start learning Dynamo.

This workflow will teach you how to:

* Use number sliders to control variables in your design.
* Create and modify geometric elements using nodes.
* Visualize design results in real-time.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-d4f1c08bb3ac37b8f87ec4780f6abb8adfea991b%2Fvase1.gif?alt=media\&token=fd9c051d-5e0b-4abb-9285-51878c1facf8)

## Defining Our Objectives

Before jumping into dynamo let's conceptually design our vase.

Let's say we are going to design a clay vase that takes into account manufacturing practices used by ceramists. Ceramists normally use a pottery wheel to fabricate cylindrical vases. Then, by applying pressure on various heights of the vase they can alter the shape of the vase and create varied designs.

We would use a similar methodology to define our vase. We will create 4 circles at different heights and radii and we will then create a surface by lofting those circles.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-7aab50d9c9a6c7266dfd82649aac2740406df4ba%2Fvase2.png?alt=media\&token=89c1c9bc-25c3-4c82-9f5b-697a617871a2)

## Getting Started

> Download the example file by clicking on the link below.
>
> A full list of example files can be found in the Appendix.

{% file src="<https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-0aeeb52133bd7bdec15f5e4947118f282baf744e%2FDynamoSampleWorkflow-vase.dyn?alt=media&token=cea48e2e-311a-4925-954c-01b2ca6b2e59>" %}

We need the nodes that will represent the sequence of actions Dynamo will execute. Since we know we are trying to create a circle, let's start by locating a node that does so. Use the **Search field** or browse through the **Library** to find the **Circle.ByCenterPointRadius** node and add it to the Workspace

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-220b5e975a1e7216778ad3693a3616b427ccbf5d%2Fvase8.png?alt=media\&token=8dd7c28a-c634-478b-914c-269d1bbcc131)

> 1. Search > "Circle..."
> 2. Select > "ByCenterPointRadius"
> 3. Node will appear in workspace

Let's take a closer look at this node. On the left side, you have the node's inputs (*centerPoint* and *radius*) and on the right side, you have the node's output (Circle). Notice that the outputs have a light blue line. This means that the input has a default value. To get more information about the input hover over its name. The *radius* input needs a double input and has a default value of 1.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-53ea4c6c048bb867735de34f2d785d0bfeef8e4e%2Fvase10.png?alt=media\&token=03cfce30-1a12-4bde-8f3b-df3d9c7e8a74)

We will leave the default value of *centerPoint* but add a **Number Slider** to control the radius. As we did with the **Circle.ByCenterPointRadius** node, use the library to search for **Number Slider** and add it to your graph.

This node is a bit different than our previous node as it contains a slider. You can use the interface to change the output value of the slider.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-07016e1b4ef567f2b75cb57ff812335034bf6f1e%2Fvase13.gif?alt=media\&token=edfa89d5-9874-46b2-9b19-cf81d0b58bc3)

The slider can be configured using the dropdown button at the left of the node. Let's limit the slider to a maximum value of 15.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-2f48f1f624f085693da8500d101acb2d78797029%2Fvase11.png?alt=media\&token=67854c30-ee4f-4508-a4f2-e83a10ec34b0)

Let's place it on the left of our **Circle.ByCenterPointRadius** node and connect both nodes by selecting the **Number Slider** output and connecting it to the Radius input.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-d5ecbada5ccfc9cd0468fb3b41cef939a32950ea%2Fvase12.png?alt=media\&token=10618c62-9905-44b3-9926-0f40c10a6bd6)

Let's also change the Number Slider name to "Top Radius" by double-clicking on the node's name.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-2c197a0520f1d3e298d83e46b9567d276dafffb4%2Fvase14.png?alt=media\&token=3dd870c0-677a-4ce6-8e5f-5c1d53c14473)

## Next steps

Let's continue adding some nodes and connections to our logic to define our vase.

### Creating Circles of Different Radii

Let's copy these nodes 4 times so that these circles define our surface, change the Number Slider's names as shown below.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-8ff54314fe537be3ec02357142f9930906ec9e78%2Fvase4.png?alt=media\&token=c1d6209e-e0ea-4682-be1a-2d16fcc532cd)

> 1. Circles are created by a center point and a radius

### Moving Circles Through the Vase Height

We are missing a key parameter to our vase, its height. In order to control the vase's height, we create another number slider. We also add a **Code Block** node. Code blocks can help as add personalized code snippets to our workflow. We will use the code block to multiply the height slider by different factors so that we can position our circles along the vase's height.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-c9dbbd2e43bc20b6cacb5ccffaadae9599bfc7d4%2Fvase15.png?alt=media\&token=17899725-f4a4-4118-beba-0b20b8d94dbd)

We then use a **Geometry.Translate** node to place circles at the desired height. Since we want to distribute our circles through the vase we use code blocks to multiply the height parameter by a factor.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-ea6ceb16a88f28b88c6d32f0b9019266eba8de15%2Fvase5.png?alt=media\&token=161cee89-1bb0-4c74-8d01-9be0110834b4)

> 2\. Circles are translated (moved) by a variable in the z axis.

### Creating the Surface

In order to create a surface using the **Surface.ByLoft** node we need to combine all of our translated circles into a list. We use the **List.Create** to combine all of our circles into a single list, and then finally output this list to the **Surface.ByLoft** node to view results.

Let's also turn off the preview in other nodes to only display the Surface.ByLoft display.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-aae99c979989f28a47e7e780c5fda0f4710b66f1%2Fvase6.png?alt=media\&token=5888fda7-1834-4d10-8ede-6a578526edb4)

> 3\. A surface is created by lofting the translated circles.

## Results

Our workflow is ready! We can now use the **Number Sliders** we defined in our script to create different vase designs.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-d4f1c08bb3ac37b8f87ec4780f6abb8adfea991b%2Fvase1.gif?alt=media\&token=fd9c051d-5e0b-4abb-9285-51878c1facf8)

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-07c9b7562a08b134c47504805cf687b1f90e3971%2Fvase7.png?alt=media\&token=dd66b427-62b7-4b5a-aaaf-08c42bd030db)
