So I have temporarily moved my sphere project aside, noting on how difficult it is and I just haven't gotten anywhere on it really, and am trying to work on a new noise demo with which I am trying to create a row of noise with different colors. I am very close as usual I believe, but it wouldn't hurt to get some extra input. Here is my code for this project..................................................................................................................................................
void display() { for (int y =0; y <height; y++) { for (int x = 0; x<width; x++) { float gray = noise(xnoise, ynoise) *255; stroke(gray); point(x, y); xnoise = xnoise + inc; size(100,100); } } }
}
The second class I have is basically a copy of the first NoiseMaker class. I figured I would just create more classes because I couldn't seem to figure out how to make more Noise blocks.
Here is the second class-----------------------------------------------------------------------------------------------------------------------------------
Here is my Rotating class I have created------------------------------------------------------------------------
class Rotating{ //class created. ---------------------------------------------This is the data portion of the class.
color c; //color variable created; calling it "c".
float xpos; //float xpos is created.
float ypos; //float ypos is created.
float xspeed; //float xspeed is created.
Rotating(){ // creating the constructor for the class--------------------------This is the constructor of the class.
c = color(255); // c is assigned the color of white.
xpos = 100; //xpos is assigned the width/2 of my screen window.
ypos = height/2; //ypos is assigned the height/2 of my screen window.
xspeed = 10; // xspeed is assigned the value of 1.
}
void display(){ //the function "display" is created.-------------------------------------------------------functionality of the class begins.
ellipseMode(CENTER); //ellipseMode is created and centered.
fill(c); //the fill of the Sphere I have is called through "c" which is assigned the color of white for now.
sphere(200); //the actual sphere is created.
}
void rotation(){ //this is the other function I have created for the class Rotating. -------------------------------Second function of the functionality of the class begins.
xpos = xpos + xspeed; //xpos is being set equal to xpos plus xspeed. Essentially width/2 = width/2 + 1.
if(xpos>width){ //if statement saying if xpos(701) is greater than width(700) then xpos equals 0. This means that the sphere will be drawn from the top left of the screen.
For ease of reading I have highlighted my code. I was wondering if anyone could help me rotate this sphere? I feel like I am so close I just need so guidance. My code is for a demo on Perlin Noise and I am trying to texture map an image of noise I have created onto the sphere to show how procedural texture mapping works. I just haven't gotten to that part yet because I am trying to get my sphere to rotate first. Thanks everyone.
I am having a hard time getting my text to appear from my XML file onto the screen; I have no idea where I went wrong, but I have tried nearly everything to fix this. Here is my code.
<data homeText= "During the last Ice Age, the Sycamore region lay at the edge of a mile thick sheet of ice.
Running along one blue ice ridge, across DeKalb County, thick-skinned and rough-haired Mastodons lumbered through the landscape.
The Ice Age display at the Midwest Museum of Natural History features a diorama depicting a portion of this scene designed to illustrate life and change in the Midwest region beginning 12,000 years ago." />
I have been following the XML example on the Processing website and trying to substitute my corresponding values in, but I get stuck when I get to the string part of the code because I don't know what to call my string. Any help would be wonderful thank you.
After countless searching of topics posted on this forum I am still in need of some help with my code for an interactive kiosk I am working on. I am using classes for everything on this project; I am trying to load in some .mov files I made in Adobe After Effects CS5 and I cannot get them to work. I will post my code.
class BrownBlock { //BrownBlock class being created.
//int xpos;
//int ypos;
color c; //color variable.
BrownBlock(color tempC){ //temporary variables are initiated.
c = tempC; //c is declared.
//int xpos = width/2;
//int ypos = height/2;
}
void display(int xpos, int ypos){ //function void display is positioned with xpos and ypos.
rectMode(CENTER); //rectangle is drawn from the center.
fill(c); //fill of the rectangle is variable c.
rect(xpos,ypos,600,300); //coordinates of the rectangle.
}
-------------------------------------------------third tab------------------------------------------------movieClass------------- for my first slide show
class Movie{ //class wolf being created.
// Movie(){ //data of class.
// Movie(this, "wolfVid.mp4.mp4"); //actual video of the class being created.
Basically I am getting better with processing, but I have never worked with video before in this program, and I am unsure whether or not I am going about this correctly? I have a good handle on classes thanks to the OOP search I get on the main website. For some reason the error is saying the "function display(int,int) does not exist. I thought it did because I see the function in the BrownBlock class? I also have the "Processing: A Programming Handbook for Visual Designers and Artists" book which is great! Although there is no mention of video in the book that I could find in the index. Any help would be greatly appreciated thank you.