# Hello i need help with my homework (cross with line hatching)

**URL:** <https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771>\
**Category:** Project Guidance\
**Tags:** homework\
**Created:** [January 21, 2022, 8:09am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771 "2022-01-21T08:09:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex5](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@alex5](https://discourse.processing.org/u/alex5)\
**Post date:** [January 21, 2022, 8:09am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/1 "2022-01-21T08:09:25Z")

</div>

> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147)

i need to draw this figure, the instructors are: do a line hatching with a 5 pixel interval in between each line  
thank you very much

 ![IMG_20220121_090956](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f8f872fb8ce1a47cd4b42398086149b832ac87d8.jpeg)

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [January 21, 2022, 8:26am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/2 "2022-01-21T08:26:55Z")

</div>

Hello,  
What have you tried so far?

---

<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:** [January 21, 2022, 9:14am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/3 "2022-01-21T09:14:47Z")

</div>

please look carefully at the image and describe us what you see:

where do the lines start, where do they go, how do the change? How many groups of lines are there?

What commands would you use?

---

<div class="post-metadata">

**Author:** ![alex5](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@alex5](https://discourse.processing.org/u/alex5)\
**Post date:** [January 24, 2022, 8:32am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/4 "2022-01-24T08:32:52Z")

</div>

i got no idea, i dont know if the lines start at the centre or at each point of the cross, ive been told to use loops i think but i know nothing about processing i dont know how im meant to do this.

---

<div class="post-metadata">

**Author:** ![alex5](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@alex5](https://discourse.processing.org/u/alex5)\
**Post date:** [January 24, 2022, 8:33am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/5 "2022-01-24T08:33:47Z")

</div>

nothing, ive done other exercises like this but because i found help on google and youtube but i barely know anything

---

<div class="post-metadata">

**Author:** ![alex5](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@alex5](https://discourse.processing.org/u/alex5)\
**Post date:** [January 24, 2022, 8:45am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/6 "2022-01-24T08:45:50Z")

</div>

i think lines go from every apex to every other apex and there are 4 groups?

---

<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:** [January 24, 2022, 8:59am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/7 "2022-01-24T08:59:01Z")

</div>

The last answer is the best (not fully correct maybe but best)

Now let’s look at the leftmost point.

What are the lines doing from there (you said 4 groups so let’s talk only about one group for now)?

**Next**

Ok, please write a program with setup and draw

Now write a line Command

Now put it into a for loop

How can you use the values of the for loop for the line command?

---

<div class="post-metadata">

**Author:** ![alex5](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@alex5](https://discourse.processing.org/u/alex5)\
**Post date:** [January 24, 2022, 9:03am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/8 "2022-01-24T09:03:31Z")

</div>

the upper apex has lines that go to the lower one but each line gets closer to the right and left apexs right?

---

<div class="post-metadata">

**Author:** ![alex5](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@alex5](https://discourse.processing.org/u/alex5)\
**Post date:** [January 24, 2022, 9:05am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/9 "2022-01-24T09:05:01Z")

</div>

i dont know what a for loop is, i will search it later,since im at class now thanyou

---

<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:** [January 24, 2022, 9:20am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/10 "2022-01-24T09:20:21Z")

</div>

Check this out : reference for the for loop

See [Reference / Processing.org](https://processing.org/reference/for.html)

---

<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:** [January 24, 2022, 9:21am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/11 "2022-01-24T09:21:27Z")

</div>

> [@alex5](#):
>
> the upper apex has lines that go to the lower one but each line gets closer to the right and left apexs right?

Almost

I think it’s almost like this, especially the 2nd half is good

---

<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:** [January 24, 2022, 10:06am UTC](https://discourse.processing.org/t/hello-i-need-help-with-my-homework-cross-with-line-hatching/34771/12 "2022-01-24T10:06:56Z")

</div>

I think this picture should help you work out how to draw it…

 ![LINES](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e2e7093e1e714083d1cb49d323aa30276cd9cb27.png)

To make this, I started with a red line, then the orange lines, then yellow, and so on…
