void draw_2d_fit(RendererViewport r, OpticalSystem system, bool keep_aspect) { Vector3Pair b = system.get_bounding_box(); r.set_window(Vector2Pair.from(b, 2, 1), keep_aspect); r.set_camera_direction(Vector3.vector3_100); r.set_camera_position(Vector3.vector3_0); r.set_feature_size(b.v1.y() - b.v0.y() / 20.0); }
void draw_2d(RendererSvg r, OpticalSystem system) { // optical axis Vector3Pair b = system.get_bounding_box(); r.draw_segment(new Vector2Pair(new Vector2(b.v0.z(), 0.0), new Vector2(b.v1.z(), 0.0)), Rgb.rgb_gray); foreach (Element e in system.elements()) { draw_element_2d(r, e, null); } }