Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
jojoj0
jojoj0's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Extension to a class (GrayScott)
[3 Replies]
23-Aug-2011 09:14 PM
Forum:
Contributed Library Questions
Hi all,
I have a question in regards to extending a class, GrayScott in particular.
I want to extend this class and override method getFCoeffAt.
I want to have it respond to the x coordinates instead of just drawing from a universal integer.
How do I do that?
Not very experienced at this, but still wanting to give it a go.
Here's an attempt at trying to extend it.
Many thanks!
class JoScott extends toxi.sim.grayscott.GrayScott {
int xf = width/2;
int yf = height/2;
//int f= xcoord;
JoScott(int width, int height, boolean wrap) {
super(width, height, wrap);
float xfcof getFCoeffAt( xf, yf) {
return f*xf;
}
float getFOverride(int xf, int yf){
return this.getFCoeffAt(x,y);
}
}
}
«Prev
Next »
Moderate user : jojoj0
Forum