3 Replies - 491 Views - Last Post: 06 October 2018 - 09:20 AM Rate Topic: -----

#1 Rmalone66   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-October 18

Beginner Help, Really simple, help greatly appreciated

Posted 06 October 2018 - 06:29 AM

void setup()
{
 size(400, 400);               // create window
}
 
void draw()
{
  background(255,255,255);     // clear the screen
  fill(255,0,0);               // red
 rect(frameCount%360,200,200,50);
 size(400, 400);
 fill(255, 0,255); 
ellipse(frameCount%360,250,50,50);

ellipse(frameCount%355,250,50,50);
}



All I need to do is change the x co ordinate of the second ellipse shape I can see all the options to change width, height and y position but when I put in frameCount% I am unsure how to do so any help greatly appreciated

This post has been edited by macosxnerd101: 06 October 2018 - 09:19 AM
Reason for edit:: Added code tags and moved to Other Languages. This is not Java.


Is This A Good Question/Topic? 0
  • +

Replies To: Beginner Help, Really simple, help greatly appreciated

#2 Programmer2004   User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 96
  • Joined: 25-October 17

Re: Beginner Help, Really simple, help greatly appreciated

Posted 06 October 2018 - 06:47 AM

So you have position and size customization options in your program, but you don't know how to apply them to the shape, am I right?

If yes, then read the value of X option and pass it to ellipse function instead of frameCount.
Was This Post Helpful? 0
  • +
  • -

#3 Sheepings   User is offline

  • D.I.C Lover
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,260
  • Joined: 05-December 13

Re: Beginner Help, Really simple, help greatly appreciated

Posted 06 October 2018 - 08:27 AM

Please use code tags. Click the code tag button and paste your code between them
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12634
  • View blog
  • Posts: 45,799
  • Joined: 27-December 08

Re: Beginner Help, Really simple, help greatly appreciated

Posted 06 October 2018 - 09:20 AM

Moved to Other Languages, as this is not Java.

@Sheepings: FYI- if you hit the report button, then a moderator/admin can add code tags and remind the OP. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1