# Coding problem 123 (Messy Curve Draw)

**URL:** <https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085>\
**Category:** Coding Questions\
**Created:** [April 3, 2021, 10:19am UTC](https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085 "2021-04-03T10:19:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxddf](https://avatars.discourse-cdn.com/v4/letter/f/c37758/32.png) [@fxddf](https://discourse.processing.org/u/fxddf)\
**Post date:** [April 3, 2021, 10:19am UTC](https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085/1 "2021-04-03T10:19:12Z")

</div>

**I found this code from the following site, but I do not see anything by changing the values. Can anyone help me?**

> **[Messy Curve Draw - OpenProcessing](https://openprocessing.org/sketch/486307#)**
>
> Draw a portrait with messy curves

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [April 3, 2021, 11:08am UTC](https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085/2 "2021-04-03T11:08:52Z")

</div>

What values are you changing?

---

<div class="post-metadata">

**Author:** ![fxddf](https://avatars.discourse-cdn.com/v4/letter/f/c37758/32.png) [@fxddf](https://discourse.processing.org/u/fxddf)\
**Post date:** [April 4, 2021, 7:02am UTC](https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085/3 "2021-04-04T07:02:06Z")

</div>

var subStep = 800;

if(windowWidth \< 600)

error:  
Cannot read property ‘width’ of undefined (sketch: line 81)  
image is not defined (sketch: line 11)  
Event {isTrusted: true, constructor: Object}  
isTrusted: true  
: “Event”

1. name: “Event”  
Uncaught TypeError: Cannot read property ‘width’ of undefined (sketch: line 81)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [April 4, 2021, 7:38am UTC](https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085/4 "2021-04-04T07:38:30Z")

</div>

Please show your code with the changes

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [April 4, 2021, 9:18am UTC](https://discourse.processing.org/t/coding-problem-123-messy-curve-draw/29085/5 "2021-04-04T09:18:23Z")

</div>

@fxdff,

I can change values on OpenProcessing and see changes to running sketch.

I downloaded the sketch and can run it on a local [web server](https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb/) and can see changes.

It also works with Processing PDE in P5.s mode.

One of the variables I changed was:  
`var maxSpeed = 3.0; //Changes to 1.0`

Take a look here:  
_[get started | p5.js](https://p5js.org/get-started/)_ It has a link to running a local server.

`:)`
