# Script to input data feed on a mesh

**URL:** <https://discourse.processing.org/t/script-to-input-data-feed-on-a-mesh/124>\
**Category:** Project Guidance\
**Created:** [May 19, 2018, 2:13am UTC](https://discourse.processing.org/t/script-to-input-data-feed-on-a-mesh/124 "2018-05-19T02:13:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miam1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@miam1](https://discourse.processing.org/u/miam1)\
**Post date:** [May 19, 2018, 2:13am UTC](https://discourse.processing.org/t/script-to-input-data-feed-on-a-mesh/124/1 "2018-05-19T02:13:15Z")

</div>

Does anyone know of a script (or a method to try and create one) to input a data feed that will disrupt a 3d scanned mesh? (Ie: wind or temperature feed that could “run” across a 3d surface)

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [May 19, 2018, 2:23am UTC](https://discourse.processing.org/t/script-to-input-data-feed-on-a-mesh/124/2 "2018-05-19T02:23:32Z")

</div>

The best advice I can give you is to [break your problem down into smaller pieces](http://happycoding.io/tutorials/how-to/program) and take those problems on one at a time.

For example, can you find a data set that matches what you’re looking for? Googling stuff like “weather wind api” will return a ton of results. Research your options and put together a simple example that does something like print out the current wind speed for your city (or however the wind data is accessed).

Separately from that, can you create a small example sketch that uses hard-coded data to show a 3D mesh? Start with just 1 node, then 2. Get that working perfectly before adding more nodes. Try it with different hard-coded data to see the effects on your mesh.

Get each of those working perfectly by themselves before you think about combining them. Then if you get stuck on a specific step, you can post a [MCVE](https://stackoverflow.com/help/mcve) along with a more specific technical question. Good luck!

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 19, 2018, 3:36am UTC](https://discourse.processing.org/t/script-to-input-data-feed-on-a-mesh/124/3 "2018-05-19T03:36:36Z")

</div>

Following the suggestion from @Kevin, when breaking it into smaller parts you can also try feeding purely random data into your mesh – then make the data meaningful later. That means that some aspects of data loading and storage might also be separated – when you directly feed random values in, does your mesh “disrupt” in the ways you had in mind? If you set `randomSeed()` then the random value sequence is repeatable – so they can function like a randomized test data set.

---

<div class="post-metadata">

**Author:** ![fjenett](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fjenett/32/18_2.png) [@fjenett](https://discourse.processing.org/u/fjenett)\
**Post date:** [May 19, 2018, 11:44am UTC](https://discourse.processing.org/t/script-to-input-data-feed-on-a-mesh/124/4 "2018-05-19T11:44:09Z")

</div>

Following @jeremydouglass answer: you could also use the `noise(x, y)` function which has the advantage that it has continuous values. See here: [https://processing.org/examples/noise2d.html](https://processing.org/examples/noise2d.html)
