# Want My Own Shape for this code

**URL:** <https://discourse.processing.org/t/want-my-own-shape-for-this-code/18366>\
**Category:** Coding Questions\
**Created:** [March 3, 2020, 9:43pm UTC](https://discourse.processing.org/t/want-my-own-shape-for-this-code/18366 "2020-03-03T21:43:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heelaries](https://avatars.discourse-cdn.com/v4/letter/h/0ea827/32.png) [@heelaries](https://discourse.processing.org/u/heelaries)\
**Post date:** [March 3, 2020, 9:43pm UTC](https://discourse.processing.org/t/want-my-own-shape-for-this-code/18366/1 "2020-03-03T21:43:25Z")

</div>

I want to add my own image/shape to this code. This is the code from processing I want to add the image to:

int num = 50;  
int[] x = new int[num];  
int[] y = new int[num];

void setup() {  
size(100, 100);  
noStroke();  
fill(255, 102);  
}

void draw() {  
background(0);  
// Shift the values to the right  
for (int i = num-1; i \> 0; i–) {  
x[i] = x[i-1];  
y[i] = y[i-1];  
}  
// Add the new values to the beginning of the array  
x[0] = mouseX;  
y[0] = mouseY;  
// Draw the circles  
for (int i = 0; i \< num; i++) {  
ellipse(x[i], y[i], i/2.0, i/2.0);  
}  
}

---

<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:** [March 3, 2020, 9:46pm UTC](https://discourse.processing.org/t/want-my-own-shape-for-this-code/18366/2 "2020-03-03T21:46:32Z")

</div>

Please elaborate- do you want to loadImage and display image with image() command underneath the graphic?

See reference loadImage and image please

---

<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:** [March 6, 2020, 6:06pm UTC](https://discourse.processing.org/t/want-my-own-shape-for-this-code/18366/3 "2020-03-06T18:06:55Z")

</div>

Welcome to the forum! When you post, please help us help you by [formatting your code](https://discourse.processing.org/faq#format-your-code). You can still edit your top post to fix it.

Here is that reference page:  
[https://processing.org/reference/loadImage\_.html](https://processing.org/reference/loadImage_.html)
