At 07:27 23/08/2002, Guy Marson wrote:
put these strange things into a nice little fractint formula.. so we will be happy.. 8-)))
cheers,
guy
comment{ This finds a solution to the elliptic equation y^2 = x^3 + Ax + B (In truth, I solve f(x,y) == x^3 + Ax + B - y^2 = 0 g(x,y) == x - y = 0 i.e., the (three) points on the elliptic curve that intersect the main diagonal. ) via the Newton method for various A and B, which get their values from pixel; starting point is provided in p1. In other words, this is a dual to the normal way of using Newton's method: instead of having one equation to solve and starting from various points, we're using a single starting point and solving for a whole family of equations. Does anyone get the feeling that it's all semantics? You should - all I'm doing is swapping the labels "parameter" and "variable". I just felt like doing that. To keep people satisfied, I offer the more traditional relabeling afterwards. } newton_elliptics{ x=real(p1) y=imag(p1) A=real(pixel) B=imag(pixel) z=x+flip(y) : oz=z x=real(z) y=imag(z) d=2*y-3*sqr(x)-A f=(sqr(x)+A)*x+B-sqr(y) g=x-y nx=x+(-f-2*y*g)/d ny=y+(-f+(3*sqr(x)+A)*g)/d z=nx+flip(ny) |z-oz|>0.0001 } newton_elliptics_2{ x=real(pixel) y=imag(pixel) A=real(p1) B=imag(p1) z=x+flip(y) : oz=z x=real(z) y=imag(z) d=2*y-3*sqr(x)-A f=(sqr(x)+A)*x+B-sqr(y) g=x-y nx=x+(-f-2*y*g)/d ny=y+(-f+(3*sqr(x)+A)*g)/d z=nx+flip(ny) |z-oz|>0.0001 } comment { Why stick with x-y=0? Now we're solving for g(x,y) == tan(phi)*x+t-y=0, where phi and t are given by p2. } newton_elliptics_3{ x=real(p1) y=imag(p1) A=real(pixel) B=imag(pixel) phi=tan(real(p2)) t=imag(p2) z=x+flip(y) : oz=z x=real(z) y=imag(z) d=2*y*phi-(3*sqr(x)+A) f=(sqr(x)+A)*x+B-sqr(y) g=phi*x+t-y nx=x-f+2*y*g ny=y-phi*f+(3*sqr(x)+A)*g z=nx+flip(ny) |z-oz|>0.0001 } newton_elliptics_4{ x=real(pixel) y=imag(pixel) A=real(p1) B=imag(p1) phi=tan(real(p2)) t=imag(p2) z=x+flip(y) : oz=z x=real(z) y=imag(z) d=2*y*phi-(3*sqr(x)+A) f=(sqr(x)+A)*x+B-sqr(y) g=phi*x+t-y nx=x-f+2*y*g ny=y-phi*f+(3*sqr(x)+A)*g z=nx+flip(ny) |z-oz|>0.0001 } .... I think. My brain is running very sluggishly right now. I'm down to 20wpm and it took quarter of an hour to figure out the equation for a line in terms of rotation and offset. I wouldn't be completely surprised if all that were totally bogus. Morgan L. Owens "Quarter of an hour. That's bad...."