GLVisualize.jl icon indicating copy to clipboard operation
GLVisualize.jl copied to clipboard

Controlling speed of loop rendering

Open loicspace opened this issue 7 years ago • 2 comments

Hi,

First, that's one great package, I'm having a lot of fun with it! Now, I'm rendering a surface where the color is a function of time (I'm rendering the ground coverage of a constellation of small satellites over time), which works great. However, the animation is "too fast", and I end up with a bunch of pixels blinking really quickly -- is there a way to explicitly slow down how the loop is rendered?

Thanks!

loicspace avatar May 11 '17 17:05 loicspace

Great to hear :)

Depends a bit on how you structured things!

one way would be like that:


color = Signal(RGBA(0f0, 0f0, 0f0, 1f0)
@async renderloop(window)
while isopen(window)
    push!(color, newcolor)
    yield()
    sleep(0.1)
end

SimonDanisch avatar May 11 '17 18:05 SimonDanisch

Ah, very true. I essentially have a timesignal, e.g., loop(linspace(something)), and a surface rendered like:

covt = visualize((lon, lat, zeros(lat)),:surface,color=colo, light=light) _view(covt, window, camera=:perspective)

and colo is of the form:

colo = map(gen_col_inst, timesignal)

where gen_col_inst is a function that determines whether or not a given surface element is covered or not.

P.S. Not time critical issue, I have now added enough bells and whistles in the window that the animation is more than slow enough now ;)

loicspace avatar May 16 '17 23:05 loicspace