Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

malibugranprix2000 Group Title

I was wondering how can this be done in processing. Can I get help on how to figure this out. The government of the fictional country of Alańeðia has hired you to design its new flag. Here are their requirements. The flag must have at least two sets of repeating elements. (For example, the U.S. flag has stars and stripes as its repeating elements.) You must use a for or while loop to draw each of the repeating elements. The flag must be wider than it is tall. The minimum height of your sketch must be 250 pixels. The left side of the flag must be a straight line; otherwise, it couldn’t be attached to a flagpole. That means your flag cannot be a circle or an ellipse. (However, the flag does not have to be a rectangle.) The interior of the flag must use at least three of these colors: black, white, blue, yellow, green, and red. Your flag must not be a duplicate of any existing country’s flag; the Alańeðians don’t want to cause an international incident.

  • one year ago
  • one year ago

  • This Question is Closed
  1. arkanoid Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Hello. So, what's your particular problem here?

    • one year ago
  2. malibugranprix2000 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I am trouble figuring out what I need to do here. I can use for or while loop to draw the repeating elements.

    • one year ago
  3. arkanoid Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Start from the basics. Try to sketch a rectangle 300 x 250 with 3 stripes, then add the alternating colors.

    • one year ago
  4. malibugranprix2000 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @arkanoid this is what I got, rect(50, 50, 300, 250); rect(50, 300, 45, 150); line(50, 50, 350, 300); rect(50, 150, 300, 40);

    • one year ago
  5. arkanoid Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Cool. :) Here's a hint on how to color them. Remember that this is just one way to do it. http://www.processing.org/reference/fill_.html You don't need to draw the flagpole.

    • one year ago
  6. malibugranprix2000 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    oh wait how do I have it set to for or while repeating elements or does that come after the color part?

    • one year ago
  7. malibugranprix2000 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Oh I realized that I have to have 3 colors inside, but I can only fill in 2

    • one year ago
  8. arkanoid Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Here's an example, so that you can figure things out. size(400,450); background(255); fill(20,0,120); rect(50, 50, 300, 250); stroke(255,0,1); line(50, 50, 350, 300); fill(0,255,0); rect(50, 150, 300, 40); fill(255); for(int i = 0;i < 10;i++){ ellipse(60 + i * 30, 70, 10, 10); rect(60 + i * 30, 270, 10, 10); } It's not entirely correct. You can either make something different based on that or make something new from scratch. :)

    • one year ago
  9. malibugranprix2000 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    hmm...that's nice. What do you mean it is not entirely correct. And it also said that in the description that it must have two sets of repeating elements does you have that?

    • one year ago
  10. arkanoid Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I don't use the colours stated and I don't have two sets of repeating elements. That's why it's not correct. But I hope it will give you ideas. For example, if you want three colours, you can make a map with three rectangles ... or you could put a circle inside the flag and paint that a different colour. The possibilities are many. :)

    • one year ago
  11. malibugranprix2000 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks for your help arkanoid. I really appreciate it.

    • one year ago
  12. arkanoid Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Hey, no prob. Glad I could help.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.