9 Jan
2016
9 Jan
'16
9:09 p.m.
> Your tidy up is good...
Thanks.
> ...I'm using maxima cas...
Very good!
Here are a few more wild and crazy debugging ideas:
> [exp] grows quite large after one or two iterations...
Here's an odd idea. Could you temporarily replace the
exp with a function that doesn't grow so quickly -- just
to get some results to look at? Perhaps a power?
So, instead of:
q = exp( s*a1*x )
you could try something like:
temp = s*a1*x
q = temp * temp
or:
temp = s*a1*x
q = temp * temp * temp * temp
q would then grow (or shrink for "temp" values less
than one,) but not in such a violent way. Using even
numbers of "temp" multiplied together always makes
its sign always be positive -- like the result of an exp().
What does the physics of the RLC circuit say about the
use of the exp() ?
> I'm also wondering if the initial x and y are meant
> to be 0 and 0 and v = (x,y) .
That's certainly easy to try -- but the significance of
doing this ought to be thought about, as well.
Here's an odd observation -- x and y get used for two
different purposes:
z = pixel
x = real(z)
y = imag(z)
and also:
c = x+h*(u+b)
d = y + h*(w + s*a1*b*b + s*b2*q*b + s*b3*b + b2*q*v + b1*q + s*b1)
x = c
y = d
z = x*x + y*y
Might the 2nd place where x and y are used need to
be xtemp and ytemp? It looks like the values of x and y
possibly needing to be constant during the calculation
of a pixel might be getting compromised by their
reuse -- unless that re-usage is intentional,
Also, I note that q is used in two different calculations:
This re-usage may or may not be intentional...
q = exp(s*a1*x )
. . .
q = exp(s*a1*a )
Note that the color map could be useful for debugging
when you get to the stage where you're looking at
resultant images.
Perhaps you could have a map that has big color
changes in adjacent lower values to be able to
better see what is going on in the initial iterations.
Is the image supposed to somehow visually depict
the ringing of a diode-clamped RLC circuit?
- Hal Lane
########################
# hallane@earthlink.net
########################
-----Original Message-----
From: Fractint [mailto:fractint-bounces@mailman.xmission.com] On Behalf Of
sciwise@ihug.co.nz
Sent: Saturday, January 9, 2016 5:50 PM
To: Fractint and General Fractals Discussion <fractint@mailman.xmission.com>
Subject: Re: [Fractint] Tedious formula
Your tidy up is good , for some reason I was having difficulty
with negative exponents.
Presently I'm using maxima cas to look at the values that exp(q)
takes , and indeed it grows quite large after one or two iterations;
to such an extent that maxima runs out of digits when printing.
Without going into the details of the
underlying equations , I
encountered a similar difficulty a number of years ago when I wrote
LnDioGH.frm ; do a web search you should be able to find the code.
I'm also wondering if the initial x and y are meant to be 0 and 0 and v =
(x,y) .
On 10/01/2016 03:52, Jonathan
Osuch wrote:
> On Sat, 2016-01-09 at 16:28 +1300, sciwise@ihug.co.nz
[1]wrote:
>
>> Difficulties remain , however this is a slightly
improved version. For some reason the loop is exited after the first
iteration ; I'm starting to think that the exponential function exp(q) might
be the cause.
>
> It depends upon what you are trying to iterate
during each loop. Take a
> look at the following. I cleaned up the code
a little, but it still
> doesn't work.
>
> DiodeRLC float=y {
> f =
1/real(p1)
> z = pixel
> x = real(z)
> y = imag(z)
> p = 0.39757
> h =
0.71743
> s = -1
> R = 1
> L =0.001
> C1 = 10^(-6)
> KT =
((1.3806485279) * 10^(-23)) * 270
> twopi = 2 * pi
> q1 =
(1.602176620898) * 10^(-19)
> Id = 10^(-12)
> a1 = q1/(KT)
> b1 =
(KT)/(q1*C1*L)
> b2 = (KT)/(Id*q1*L)
> b3 = R/L
> t1 = 0
> :
> v =
100*sin(twopi*t1)
> q = exp( s*a1*x )
> u = y
> w = s*a1*y*y + s*b2*q*y
+ s*b3*y + b2*q*v + b1*q + s*b1
> a = x+p*u
> b = y+p*w
> q = exp(
s*a1*a )
> c = x+h*(u+b)
> d = y + h*(w + s*a1*b*b + s*b2*q*b + s*b3*b +
b2*q*v + b1*q + s*b1)
> x = c
> y = d
> t1 = t1 + f
> z = x*x + y*y
> t1
< maxit ; loops until t1 is >= maxit
> }
>
> Jonathan
>
>
Links:
------
[1] mailto:sciwise@ihug.co.nz
[2]
mailto:Fractint@mailman.xmission.com
[3]
https://mailman.xmission.com/cgi-bin/mailman/listinfo/fractint
_______________________________________________
Fractint mailing list
Fractint@mailman.xmission.com
https://mailman.xmission.com/cgi-bin/mailman/listinfo/fractint
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus