Open rleegates opened 9 years ago
Yes! I put an example in patches.jl in the newest master ;) You must put the grid behind your object in the render list though... Its, again, because of the transparency. Best, Simon
Thank you very much for your quick response. However, I think what we're looking for isn't a grid, but rather just labeled axes. It would also be really nice if those could scale with data automatically. Is this something we'd have to write a custom implementation for?
We would have to write a custom implementation, which is okay, as its about time for that ;) I just fixed the text rendering module, so i might give it a try today! If you've any ideas api wise, or example pictures of what you'd like, feel free to post them! On 17 Jan 2015 14:21, "rleegates" notifications@github.com wrote:
Thank you very much for your quick response. However, I think what we're looking for isn't a grid, but rather just labeled axes. It would also be really nice if those could scale with data automatically. Is this something we'd have to write a custom implementation for?
— Reply to this email directly or view it on GitHub https://github.com/SimonDanisch/GLPlot.jl/issues/23#issuecomment-70366709 .
Also, i implemented some prototypes for a boundingbox function, so growing with the data can work. Could be slow though, depending on how you grow the data ;) On 17 Jan 2015 15:10, "Simon Danisch" sdanisch@gmail.com wrote:
We would have to write a custom implementation, which is okay, as its about time for that ;) I just fixed the text rendering module, so i might give it a try today! If you've any ideas api wise, or example pictures of what you'd like, feel free to post them! On 17 Jan 2015 14:21, "rleegates" notifications@github.com wrote:
Thank you very much for your quick response. However, I think what we're looking for isn't a grid, but rather just labeled axes. It would also be really nice if those could scale with data automatically. Is this something we'd have to write a custom implementation for?
— Reply to this email directly or view it on GitHub https://github.com/SimonDanisch/GLPlot.jl/issues/23#issuecomment-70366709 .
Okay, sounds good. Now if you'd like to hear the wish-list for christmas :dancer: here we go:
1) small CS's (just 3 small vectors in different colors) at a user-defined position and direction (e.g. for end-user-defined coordinate systems)
2) a closed bounding box with (possibly user-defined labels instead of x
, y
, z
) and labeled axis ticks
3) a bounding box without closing the box, i.e. the 3 principal vecors of the cs with the size of the bounding box (you can find an example here) with the same options and styling as 2)
4) the option to display a grid on the bounding box (just makes sense for 3))
On resizing with content: currently we clearplot
and push updated objects into the empty renderlist afterwards - there's probably a better way, although I never really found it to be slow even for a bunch of data. You could have a manual option for xlim
, ylim
, zlim
so that an automatic calculation can be circumvented :+1:. I could do this myself, however it seems like something a function in glplot would be good for: centering the camera on the center of the bounding box.
In general, although generally at war with MATLAB and especially it's slow plotting - I always really liked the style of the API that they provide - possibly that could be a guide on what the user should be exposed to in the long run.
On resizing with content: currently we clearplot and push updated objects into the empty renderlist afterward
Yeah, this is actually the worst way ;)
There are three options:
This is pretty straight forward:
trans = Input(Vec3(0))
scale = Input(Vec3(0))
modelmatrix = lift(trans, scale) do t, s
transformationmatrix(t) * scalematrix(s)
end
glplot(value, model=modelmatrix )
This is a little bit less advanced for GLBuffers compared to Textures, but I could add some functionality if needed.
glb = GLBuffer(Vec3[...])
#than you can do anywhere:
newdata = Vec3[...]
@assert length(glb) == length(newdata)
update!(glb, newdata)
# Functionality that I might add:
glb[1:10] = [Vec3(...) for i=1:10] #implement the usual array interface
This option is the least advanced, as I don't offer any api for growing the buffer yet. If this is needed, it shouldn't be too hard to implement though ;)
I started integrating a boundingbox function into the renderobject. It's not that well integrated yet but it does work relatively well. It can use for example the transformation matrix to resize the original boundingbox accordingly. If you change the data though, it's a little bit hard in the current API to change the boundingbox accordingly. Simplest way is to update the original boundingbox manually. I'll look into this a bit, and see what I can do at the moment
Well, we don't (geometrically) scale the data, we just update the colors and the coordinates of the vertices. I guess this could be done by modifying objects in the render list?
Yes! Especially if you don't have to add new points. Than it's close to being trivial ;) You can try it out with update!, or you wait, until I implemented getindex/setindex! for it.
2015-01-17 17:54 GMT+01:00 rleegates notifications@github.com:
Well, we don't (geometrically) scale the data, we just update the colors and the coordinates of the vertices. I guess this could be done by modifying objects in the render list?
— Reply to this email directly or view it on GitHub https://github.com/SimonDanisch/GLPlot.jl/issues/23#issuecomment-70374054 .
That part really isnt a priority at the moment. It works just fine the way we're doing it for the time being :)
On 17 Jan 2015, at 17:57, Sdanisch notifications@github.com wrote:
Yes! Especially if you don't have to add new points. Than it's close to being trivial ;) You can try it out with update!, or you wait, until I implemented getindex/setindex! for it.
2015-01-17 17:54 GMT+01:00 rleegates notifications@github.com:
Well, we don't (geometrically) scale the data, we just update the colors and the coordinates of the vertices. I guess this could be done by modifying objects in the render list?
— Reply to this email directly or view it on GitHub https://github.com/SimonDanisch/GLPlot.jl/issues/23#issuecomment-70374054 .
— Reply to this email directly or view it on GitHub.
Sorry, its taking some time, as I took the chance to make a little overhaul! But it should be ready this week
No worries, overhauls are always good :+1:
Hi Simon,
what's the current status?
Best, Robert
Sorry, totally got sidetracked on this. I might create a simplified version in the next days!
By the way, I just moved closer to hannover (wunstorf) ;)
cool, we can grab lunch sometime! what was the occasion for the move?
sure! I couldn't find your email, how can I reach you?
2015-02-12 13:37 GMT+01:00 rleegates notifications@github.com:
cool, we can grab lunch sometime! what was the occasion for the move?
— Reply to this email directly or view it on GitHub https://github.com/SimonDanisch/GLPlot.jl/issues/23#issuecomment-74063983 .
I was just wondering whether there has been any progress on this issue (i.e. coordinate axes)?
I would be happy to try and help with this. Do you have some code I could look at?
Hi Simon,
any API for coordinate axes?
Best, Robert