Hello,
im new here. OK, first i explain the circumstances :).
Im a C++ Programmer since about 10 years, working for a small company in Germany. Making games was always my dream since ive played Amiga in my school time. So i started to make an uniqe ASCII Multiplayer game in my spare time. I began three times from scratch to finish the enigine that provides the rendering and user interface in nostalgic Text Mode. Its based on SDL and OpenGL, its fast and it works fine. I was stumbled about an article on Code Project, a guy rendered a simple mandelbrot in Windows Console Mode. I wanted tried it out with my engine and then my biggest (sub-)project began :). The Software i wrote, called yFractalExplorer is now nearly complete. It has also a Text User Interface like the old good Fractint, but provides an more intuitive Interface with some unique features. This is more like an Entertainment Application than a common Fractal Software. You don't need know any math. You relax and fly around mostly smoothly in realtime to an intresting place, modify the fractal with keypresses and modifiers and then explore the image in graphics mode with wonderful palettes and color cycling. There is no post processing, it is minimalistic.
There are still some things to do, like loading and saving parameters, a bar in rendering mode that shows the current palette for a short while, rendering to files and adding much more fractal types. I will keep you updated when it will be released in this and my own forum on yv3.bplaced.net. It is free Donationware.
If you are intrested plz give it a try and share your opinion and suggestions with me:
http://yv3.bplaced.net/files/yFractalExplorer.exeCheck out this guy :) :
http://yv3.bplaced.net/gallery/yFractalExplorer/yFractalExplorer_011.gifHere are some Fractals that i discovered when i was developing the application:
http://yv3.bplaced.net/gallery/yFractalExplorer/But the reason i registered here was not to make advertisement, i wanted to ask you guys something ;) I have an ugly implemented rotation of the fractal because the rotation is always around the middle of the fractal. I am not bad programmer but i know only about math basics and some physics. I want that the viewport always rotates about the center of the screen, even if i change the position the rotation must still remain and then if i rotate again the rotation must be again around the center of the screen. The current code for the mandelbrot looks like this:
void yFractal::GetFractalColor4()
{
static double cx, cy, x, y, prev_x, prev_y, x_tmp, y_tmp, cosrot, sinrot;
static int n;
if(m_Rotation==0.0) //Rotation off
{
cx=m_X1 + (double(m_X)*m_WidthFactor);
cy=m_Y1 + (double(m_Y)*m_HeightFactor);
}
else //Rotate
{
x_tmp=m_X1 + (double(m_X)*m_WidthFactor);
y_tmp=m_Y1 + (double(m_Y)*m_HeightFactor);
cosrot=cos(m_Rotation);
sinrot=sin(m_Rotation);
cx=(x_tmp * cosrot) - (y_tmp * sinrot);
cy=(y_tmp * cosrot) + (x_tmp * sinrot);
}
prev_x=0;
prev_y=0;
for(n=0; n<m_Iterations; n++)
{
x=cx + (prev_x*prev_x) - (prev_y*prev_y);
y=cy + (2.0 * prev_x * prev_y);
if( ((x*x)+(y*y)) < m_Magnitude )
{
prev_x=x;
prev_y=y;
}
else
{
m_C=int( float(n) * m_ColorPerIteration );
return;
}
}
m_C=0;
}
m_X and m_Y are global Variables for faster rendering, they are set before calling the function to obtain a color index of a specific screen position.
Must i use a rotation matrix? I've googled around but maybe because my english is not as good i couldn't find a solution for this problem. The formulas on Wikipedia are too long for me, i also have to have time to play around with my son :). So maybe you can provide me a simple solution for this problem. I would be appreciated.