Dear reader
Intro
About three or four years ago I downloaded fractint and winfract. Since then,
every year, during wintertime I'm playing with those programs. It's the
formula parser that has my main interest. I can subdivide this in three
things: 1. What are the possibilities of the parser? 2. Do I understand what it
is doing? 3. Can I produce pictures, which are somehow interesting and/or
beautiful?
Now I feel the need to show some of my "investigations" to people who are
interested. I'm not sure this list is the right place, because emails I read are
mainly about implementation-problems. Well, we will see. Quit normal, during my
investigations, a lot of questions pop up. Questions I couldn't answer. Maybe
someone can.
Short formulas and graphs of real valued functions
This first time I like to show is that you can make really short formulas.
Here's one:
formula#1
jhline { :
|Imag(Pixel)|<p1
}
I like it: there is no initiation, nothing in the looping part,
there is only a criteria to stop. The formula draws the x-as. The thickness of the line depends on the parameter p1.
So I ask myself: "What is the shortest, meaningful formula
possible". I came with this:
formula#2
jhshortest { :
Pixel<0
}
This formula divides the plane in two half-planes. Apart from
the name there are 10 symbols.
Naturally this gives my first question:
question#1
Is there a shorter formula possible? Does anybody know a shorter
one?
Because Pixel=( , ) is a complex number or otherwise
interpreted a point of the plain, the statement Pixel<0
has mathematical spoken no meaning: there is no ordering in
Z or R2. Nevertheless the generator interprets
the statement. So
question#2
How interprets the formulagenerator things like z<1?
For sure these formulas have nothing to do with fractals.
But they have to do with fractint. And the first one gave me a marvellous idea
(at least that's what I think): you can use the formulagenerator for drawing the
graph of real valued functions in a rather simple way. Here are two formulas
doing that. The first draws a parabola, the second draws the graphs of functions
of the form f(x)=(ax+b)/(cx^2+dx+e)
formula#3
jhparabola {;Jos
Hendriks,2002
:
|real(Pixel)^2-imag(Pixel)-1.25|<p1
}
formula#4
jhgraphs1 {;Jos
Hendriks,2002
;graph of y= (a1*x+a2*x)/(a3*x^2+a4*x+a5)\
;imag(p3) gives the thickness
:
|(real(p1)*real(Pixel)+imag(p1))/\
(real(p2)*real(Pixel)^2+imag(p2)*\
real(Pixel)+real(p3))-imag(Pixel)|<imag(p3)||\
|real(Pixel)|<.001|||imag(Pixel)|<.001
}
In these formulas is the amount of typework not greater then in
a "math-program". The rendering time is not too long: a few seconds or less.
Moreover, and I think the most interesting part: The unusual way fractint draws
the graph (it's scanning if a point belongs to the graph or not) makes a graph a
quite elegant drawing because the thickness of the line is not everywhere the
same. So you can create elegant curves. About this maybe another time.
For convenience I have included some parameter files, because
some picture parameters are important. For instance maxiter=2. I have the frms
also repeated. In this way you can transport all at once into a par
file.
p.s:don't blame me for mistakes I make in writing English: it's
not my native language
frm:jhline { ;Jos
Hendriks,2002
;draws the line y=0, p1 gives the thickness of the line
;watch out: only two colors are used
;take for instance
maxiter=2, inside=0, outside=iter
:
|Imag(Pixel)|<p1
}
x-as {;Jos Hendriks,2002
reset=2000 type=formula
formulaname=jhline
center-mag=0/0/0.6666667 params=0.001/0
float=y maxiter=2 inside=0
colors=00000e
}
frm:jhparabola{ ;Jos Hendriks,2002,
;draws
a parabola. Thickness depends on p1.
;use maxiter=2,inside color=0,
outside=iter
:
|real(Pixel)^2-imag(Pixel)-1.25|<p1
}
jhparabola1 {;Jos
Hendriks,2002
reset=2000 type=formula
formulafile=sier.frm formulaname=jhparabola
center-mag=0.0301786/0.369842/0.4959278
params=0.1/0 float=y
maxiter=2 inside=0
colors=00000e
}
frm:jhgraphs1 { ;Jos
Hendriks,2002
;graph of y=
(a1*x+a2*x)/(a3*x^2+a4*x+a5)\
;imag(p3) gives the thickness
;also the x- and y-axes are
drawn
:
|(real(p1)*real(Pixel)+imag(p1))/\
(real(p2)*real(Pixel)^2+imag(p2)*\
real(Pixel)+real(p3))-imag(Pixel)|<imag(p3)||\
|real(Pixel)|<.001|||imag(Pixel)|<.001
{
graph1 { ;Jos Hendriks,2002, broken
polynomial function
; also x- en y-axes are
visible
reset=2000 type=formula
formulafile=sier.frm formulaname=jhgraphs1
passes=1
center-mag=-0.791138/1.96774/0.2142747
params=0/5/-1/2/1/0.02 float=y maxiter=2
inside=0 cyclerange=1/1
colors=00000e
}
graph2 { ; Jos Hendriks,2002, broken
polynomial function
; also x- en y-as are visible
reset=2000 type=formula
formulafile=sier.frm formulaname=jhgraphs1
passes=1
center-mag=-0.791138/1.96774/0.2142747
params=0/5/1/-2/-3/0.05 float=y maxiter=2
inside=0 cyclerange=1/1
colors=00000e
}
graph3 { ; Jos Hendriks,2002, broken
polynomial function
; also x- en y-axes are
visible
reset=2000 type=formula
formulafile=sier.frm formulaname=jhgraphs1
passes=1
center-mag=-0.791138/1.96774/0.2142747
params=0/5/1/0/1/0.05 float=y maxiter=2
inside=0 cyclerange=1/1
colors=00000e
}
graph4 { ; Jos Hendriks,2002, broken
polynomial function
; also x- en y-as are visible
reset=2000 type=formula
formulafile=sier.frm formulaname=jhgraphs1
passes=1
center-mag=-0.791138/1.96774/0.2142747
params=-5/5/1/0/1/0.05 float=y maxiter=2
inside=0 cyclerange=1/1
colors=00000e
}