goptical
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Goptical] spot analysis problems


From: Richard Graham
Subject: Re: [Goptical] spot analysis problems
Date: Mon, 18 Feb 2013 12:12:45 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130109 Thunderbird/17.0.2

Hi Alexandre,

You were right about needing to call one of the analysis functions to
trigger the trace. I had assumed that the initial trace would be done
when the object is constructed. It would be good to explain how this
works in the documentation.

In any case, I can now proceed to debugging the underlying problem. It
turns out that the rays are being generated and intercepted by the image
surface. I can loop over the intercepted rays and look at their
positions. For values of the density parameter that don't work, I see
the first few rays generated all have NaN's in the positions.

I have one other thing I would like to point out which may be related --
or may be an unrelated bug. My imaging plane is larger than strictly
necessary. In my layout rays propogate through the system to the right,
then the right-most component is a parabolic mirror which the rays
strike off axis and are reflected 90 deg down to the image plane. For
some reason I have to make the image plane wide enough such that it
extends to the right further than the right most point of the parabolic
mirror. If I don't do that the rays will not be reflected by the mirror.
I am using sequential analysis.

Regards,
--
Richard Graham


On 02/16/2013 07:35 AM, Alexandre Becoulet wrote:
> On Thursday 14 February 2013 21:24:56 Richard Graham wrote:
> 
> Hi Richard,
> 
>> I checked image.get_system() and it points correctly to the system.
>> Running with valgrind I get:
>>
>> ==1468== Invalid read of size 8
>> ==1468==    at 0x40A55C:
>> _Goptical::Trace::Result::get_intercepted(_Goptical::Sys::Surface
>> const&) const (result.hxx:54)
>> ==1468==    by 0x40923F: main (asphere.cc:609)
>> ==1468==  Address 0x180 is not stack'd, malloc'd or (recently) free'd
> 
> It looks like Tracer::_result_ptr is NULL. You should trigger the ray tracing 
> by calling one of the analysis function before calling get_trace_result(). 
> Maybe it would be great to have a public function for starting the ray trace 
> directly on the Analysis classes.
> 
> Use the const version of the get_tracer() function if you do not want the 
> result to be invalidated:
> 
> const_cast<const 
> Analysis::Spot&>(spot).get_tracer().get_trace_result().get_intercepted(image).size();
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]