goptical
[Top][All Lists]
Advanced

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

Re: [Goptical] non flat curve for Sys::Stop


From: Viktor Malyarchuk
Subject: Re: [Goptical] non flat curve for Sys::Stop
Date: Tue, 9 Oct 2012 05:56:16 -0500

Actually, ray tracing wise "stop->set_curve()" is working fine. The issue is when I do

Io::RendererSvg renderer("layout.svg", 800, 400);
sys.draw_2d_fit(renderer);
sys.draw_2d(renderer);

stop is still drawn as a flat line, not as a sphere. Is there any way to correct this?

Best!
Viktor Malyarchuk

On Mon, Oct 8, 2012 at 5:33 AM, Viktor Malyarchuk <address@hidden> wrote:
Hello,

Many thanks for making Goptical! It look really beautiful!

Is there a way to make non flat stop?

Here is few relevant lines from my attempt:

------------------------------------
Sys::Lens lens(Math::Vector3(0, 0, 0));
lens.add_stop(stop_radius, stop_thickness);

_Goptical::Sys::Element *stop_element = &sys.get_element(6);
Sys::Stop *stop = (Sys::Stop*)(stop_element); // downcast to Sys::Stop

stop->set_external_radius(external_radius); // increase stop's external radius
stop->set_curve(ref<Curve::Sphere>::create(sphere_radius));
------------------------------------

Last line "stop->set_curve()" seams do not do anything. Stop still look flat.

Best regards,
Viktor Malyarchuk


reply via email to

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