We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm new using Processing. I have a task to make a numerical simulation for RLC circuit using rk4. Can someone help me?
Have you run any of the examples provided? If not, open Processing, go to menu File>>Examples and try some of them. The key concept is that you need two functions in processing: setup() and draw(). Setup() always run first and only once. Then draw() follows and run continuously until either you pause it or you quit.
While you get familiar with the examples, you also need to think what do you want to do with your program. Do you want to draw circuits or do you want create a calculator of some kind.
By the way, this next link also offers examples of different levels and they are more accessible that the one provided by the Processing IDE:
Any more questions, provide specific details. Providing code will help in getting better support as it will show your approach.
When posting code in the forum, before submitting you will need to format your code. To do that, select your code and hit ctrl+o. Ensure there is a line above and below your code. It will look like this:
// First line in setup [always]: Width and Height in pixels
//Next line generates a random color. Check the reference
//Place text in your sketch
text("Welcome to Processing",width/2,height/2);
Reference is a good way to check basic commands. They also provide examples:
References for size(), color() and text() as well as setup() and draw():
we have no idea what "RLC circuit using rk4" means. care to expand?
RK4 = Runge-Kutta method.
RLC circuit = Resistor-Inductor-Capacitor circuit.
@koogs Do you realise that we have both given links to the exact same pages?
@koogs I want to make a damped oscillation RLC circuit using runge kutta methods, and interface the graph using processing. I dont understand "this" program language.
First figure out a pseudo code for calculating the voltage/current that you want to graph. Only then can you convert it to actual code.
Just to clarify, processing is good at displaying data (sort of). When it comes to calculations of this type, you will need to create your own algorithms (or search them on the web). Since you will be doing matrix operation or solving equations of some sort (my guess, I am not familiar with RK4 calculations), you might be better off working with octave (free) or matlab software.