[Top][All Lists]

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

[Octave-bug-tracker] [bug #58956] Empty plot for certain xlim / ylim set

From: Hg200
Subject: [Octave-bug-tracker] [bug #58956] Empty plot for certain xlim / ylim settings
Date: Sun, 20 Sep 2020 14:31:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #23, bug #58956 (project octave):

>> Would it be possible to use a different coordinate system for the final
rendering? E.g. one that has its origin in the center of the scene that is
rendered and the camera position (possibly far out) on the negative z-axis? 
IMHO yes but you have take care of some restrictions. First of all it should
be emphasized that you do not have to use the functions glOrtho () and
gluPerspective () either. Without invoking these functions, the "active
region" of the OpenGl renderer becomes the cuboid [-1,+1]^3 and the projection
plane becomes z=0. Everything you place in this region will appear on the

For example what we can do is to write a new update_camera() that transforms
the camera target (in Octave this is the mean value out of xlim,ylim,zlim)
into the origin [0,0,0]. glOrtho () must then be removed from gl-render.cc.
The problem with this approach is that we still have to make the
transformation from "world coordinates" into "camera coordinates". This is
done with the command

m_glfcns.glMultMatrixd (x_mat1.data ());

so the transformation remains in OpenGl and hence will be single precision. My
guess is that the limit of approx 3.4e+38 on the axes will remain. And i don't
know how "clipping" and how "light" is done in this approach. But it sounds
like a nice project for next vacation just to find out what is happening if
this change is implemented.


Reply to this item at:


  Message sent via Savannah

reply via email to

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