# Random Vertex Composition Generator for Soft Pastel Drawings

**URL:** <https://discourse.processing.org/t/random-vertex-composition-generator-for-soft-pastel-drawings/20712>\
**Category:** Gallery\
**Created:** [May 10, 2020, 3:00pm UTC](https://discourse.processing.org/t/random-vertex-composition-generator-for-soft-pastel-drawings/20712 "2020-05-10T15:00:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowboynoon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cowboynoon/32/9147_2.png) [@cowboynoon](https://discourse.processing.org/u/cowboynoon)\
**Post date:** [May 10, 2020, 3:00pm UTC](https://discourse.processing.org/t/random-vertex-composition-generator-for-soft-pastel-drawings/20712/1 "2020-05-10T15:00:59Z")

</div>

I have been working on a little project that creates random vertex compositions using the colours that I have in my soft pastel box, in an exact ratio to Canson Mi-Teintes Touch pastel papers and colours.

I have just started learning about arrays, so I am very happy to now be able to display the colours that were used in each composition. This proved very tricky at first because I didn’t know how to work with the strange number that an RGB variable turns into. (I still don’t know what to do with that number, but I sidestepped having to deal with the colour variable itself by creating a second string array with corresponding colour names). Both the colour array and the colour name array gets accessed with a random variable that corresponds to the colour and its name array location number.

Technicalities aside, I have translated about 120 compositions into actual hand rendered drawings in soft pastel so far: Here is a screenshot of the generator:

 ![screenshot - 1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/83b5a5a3119bd851a40336b400ab0cd6d9c5cac2.jpeg)

and a few images of how the actual pastel drawings turned out:

 ![PF-VERTEX-115](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/ea071e3da49a17109043d278dbd081908a807fbf.jpeg)

 ![PF-VERTEX-119](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5e057b9019a80c9653704f2e727b9c5b3b466b6e.jpeg)

 ![PF-VERTEX-114](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/80b7eecec0fda14ece6c11203fa0b571a3e396f0.jpeg)

---

<div class="post-metadata">

**Author:** ![cowboynoon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cowboynoon/32/9147_2.png) [@cowboynoon](https://discourse.processing.org/u/cowboynoon)\
**Post date:** [May 10, 2020, 3:07pm UTC](https://discourse.processing.org/t/random-vertex-composition-generator-for-soft-pastel-drawings/20712/2 "2020-05-10T15:07:32Z")

</div>

[https://codepen.io/cowboynoon/pen/RwWyJYr](https://codepen.io/cowboynoon/pen/RwWyJYr)
