Oops, you are right, it's fresnel, not frensel.

Anyways, ... my original

   plot ;/|:+.(^@j.@*:t.i.100)&p.d._1] 1p1*i:1j1000

used pi in the bounds mostly from happenstance. I could use an integer
bound equally well:

   plot ;/|:+.(^@j.@*:t.i.100)&p.d._1]i:4j1000

The problem is that if I extend the bound the approximation I am using blows up:

   plot ;/|:+.(^@j.@*:t.i.100)&p.d._1]i:5j1000

But that can be fixed by increasing the precision of my approximation:

   plot ;/|:+.(^@j.@*:t.i.1000)&p.d._1]i:5j1000

Unfortunately, if I take it further, I start seeing discrepancies
creeping back in. Specifically the end of the plot should be a spiral
but it starts to overlap:

   plot ;/|:+.(^@j.@*:t.i.1000)&p.d._1]i:6j1000

I can try increasing the precision further, but that does not solve
the problem (though it does seem to help, slightly). (some of these
start getting really slow to evaluate - patience gets you the plots,
though):

   plot ;/|:+.(^@j.@*:t.i.10000)&p.d._1]i:6j1000

Another approach is to try using exact arithmetic, but that does not
really solve the problem either:

   plot ;/|:+.(^@j.@*:t.i.1000x)&p.d._1 x:i:6j1000

And extending the precision still does not fix it (really slow here,
more than a factor of 100 slowdown on my machine):

   plot ;/|:+.(^@j.@*:t.i.10000x)&p.d._1 x:i:6j1000

This seemed to almost work right though:

   plot ;/|:+.(^@j.@*:t.i.1000x)&p.d._1 x:i:6j10000

So, anyways, I got ambitious (this was a "go out for lunch while it
runs" plot), but unfortunately, this was complete garbage:

   plot ;/|:+.(^@j.@*:t.i.10000x)&p.d._1 x:i:7j10000

...

Probably I need to take apart that (^@j.@*:t.i.10000x)&p.d._1 sub
expression and build a variant on it which goes as far as is needed
for convergence? Mostly I think I need to make sure that the
denominators are sufficiently large when compared to the numerator.

Maybe there's a better approach for this?

If anyone has insight, I'd appreciate hearing it.

Thanks,

-- 
Raul


On Fri, Jul 21, 2017 at 10:50 AM, 'Mike Day' via Programming
<[email protected]> wrote:
> Chat,   really:
>
> I've only just noticed that "fresnel" is "LENS ERF" reversed.
>
> Something to do with Fourier, perhaps?
>
> Amuses me,  mildly,  anyway.
>
> Mike
>
>
>
> On 20/07/2017 17:12, Raul Miller wrote:
>>
>> Oh, thanks.
>>
>> [If we could parenthesize constants, I guess it would be that 1p1j1000
>> is 1p(1j1000) rather than (1p1)j1000. And, that is documented at
>> http://www.jsoftware.com/help/dictionary/dcons.htm - though I wonder
>> what the advantage is.]
>>
>> As for the closed form representation issue, I'm not sure whether that
>> should be significant or not. Still, it seems to be the way things are
>> right now.
>>
>> Thanks again,
>>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to