octave-maintainers
[Top][All Lists]
Advanced

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

Re: plotted circle is regular decagon on opengl graphics


From: Daniel J Sebald
Subject: Re: plotted circle is regular decagon on opengl graphics
Date: Thu, 11 Aug 2016 14:31:31 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 08/11/2016 02:25 PM, Daniel J Sebald wrote:
On 08/11/2016 03:12 AM, Andreas Weber wrote:

As you can see the decagon is hardcoded. AFAIK there is no "draw circle"
command in OpenGL so the only way to get a smoother circle would be to
increase the numer of segments.

I'm surprised there is no type of primitive for arcs in OpenGL (or its
utility library GLU) so that hardware/CPU optimization on graphics card
drivers could be used.

The performance cost is the cos/sin computations, not the underlying
driver.  The driver essentially sweeps out the same arc no matter how
fine the angular resolution is (i.e., it may draw more polygon lines,
but the individual polygon lines are shorter so don't need as many
computations to complete).

Rik's changeset works, e.g., test:

graphics_toolkit ('qt')
plot(rand(6,1), rand(6,1), 'or')
set(get(gca,'children'),'MarkerSize',100)
set(get(gca,'children'),'MarkerFaceColor','green')

Rik, out of curiosity, I tried a negative marker size. I don't think a negative marker size should be allowed, but Octave allows it. Check what happens when following the above example with

set(get(gca,'children'),'MarkerSize',-100)
get(get(gca,'children'),'MarkerSize')

Dan



reply via email to

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