• fullscreen
  • lineas.pde
  • //declare array and set size of 100
    Orbit [] orbits = new Orbit [120];
    void setup () {
    size (400, 400);
    // use array to fill class with values
    for (int i=0; i <orbits.length; i++) {
    int r = 2*i; // radius of the circle
    int r2 = 3*i; //radius of the orbit
    float t = .001*r;
    int rojo = i*3; //red
    int verde = i*2; //green
    int azul = 255-i*2; //blue
    orbits[i] = new Orbit ( 0, r, r2, t, rojo, verde, azul);
    void draw () {
    background (0);
    // call the array to display all the circles
    for (int i = 0; i < orbits.length; i++) {
    class Orbit {
    //data (variables)
    float theta; //theta is angle
    int r; //radius of circle
    int r2; //radius of orbit
    float t;
    int rojo;
    int verde;
    int azul;
    Orbit (float tempTheta, int tempR, int tempR2, float tempT, int tempRojo, int tempVerde, int tempAzul) {
    theta = tempTheta;
    r = tempR;
    r2 = tempR2;
    t = tempT;
    rojo = tempRojo;
    verde = tempVerde;
    azul = tempAzul;
    //methods and functions
    void move () {
    stroke (rojo, verde, azul, 30);
    //noStroke ();
    line ( width/2 + cos(theta)*r2,r, height/2 + sin(theta)*r2,r*2);
    //increment theta
    //increase to speed up movement
    theta += t*.5;
    //increment s to change radius of circle


    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.



    Report Sketch

    Report for inappropriate content

    Please provide details if possible:

    Your have successfully reported the sketch. Thank you very much for helping to keep OpenProcessing clean and tidy :)

    Make a Copyright Infringement claim

    Efrain Garcia A

    lines array

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.


    You need to login/register to comment.