Skip to content

Conversation

@bellenot
Copy link
Member

…needed

@linev linev merged commit 498825a into root-project:dev Jul 19, 2016
@linev
Copy link
Member

linev commented Jul 19, 2016

Is it not better to assign zmin/zmax values directly when drawing 3D axes?
It is function JSROOT.Painter.TH2Painter_Draw3D
in file JSRoot3DPainter.js, line 749

@linev
Copy link
Member

linev commented Jul 19, 2016

That is also missing - drawing labels instead of number for the axes in 3D

@bellenot
Copy link
Member Author

Well, it is not complete anyway, since the bins with 0 entries are not drawn in 3D mode. So there is still some development to be done for lego plots...

@linev
Copy link
Member

linev commented Jul 19, 2016

Do you want to implement this?
It also can go into master branch.
I want to finish code for TGeo drawing, probably later today I can check lego plot myself.

@bellenot
Copy link
Member Author

I wish I could, but I'll be away later today...

@linev
Copy link
Member

linev commented Jul 19, 2016

Ok, I will check later today.

@bellenot
Copy link
Member Author

See also the lego2 option (for later):
canvas_1

@linev
Copy link
Member

linev commented Jul 19, 2016

I am aware about this draw option.
Till now I have no good solution for this.
Most probably, one could create special colz textures and to use them.
Like described here:

http://solutiondesign.com/blog/-/blogs/webgl-and-three-js-texture-mappi-1/

But this is not an easy task.

@bellenot
Copy link
Member Author

I know, but this is not urgent anyway, I'll take a look for possible solutions sometime in the future

@bellenot
Copy link
Member Author

linev added a commit that referenced this pull request Jul 20, 2016
Refactor code from #70 pull request
linev added a commit that referenced this pull request Jul 20, 2016
Also automatic scaling of very large labels implemented.
Makes plot in #70 closer to original ROOT drawing.
@linev
Copy link
Member

linev commented Jul 20, 2016

In current code I add support of the labels in 3D plots:
http://jsroot.gsi.de/dev/?nobrowser&json=http://jsroot.gsi.de/files/tmp/th2.json.gz&opt=lego

@bellenot
Copy link
Member Author

Excellent! Thanks! I forgot to look at this...

@bellenot
Copy link
Member Author

BTW, will those changes also be applied in the master?

@linev
Copy link
Member

linev commented Jul 20, 2016

BTW, will those changes also be applied in the master?

Not yet - these are significant changes/improvements, not a bug fix.
I prefer to keep them in 'dev' branch and release with 4.6.0 version in several weeks

@bellenot
Copy link
Member Author

OK, fine with me

@linev
Copy link
Member

linev commented Jul 22, 2016

Now there is support of several lego draw options like: lego0, lego2, legofb, legobb.
For instance, same th2 histogram with lego2 plot:

pad

Or via URL:

http://jsroot.gsi.de/dev/?json=http://jsroot.gsi.de/files/tmp/th2.json.gz&opt=lego2,pal50,gridz

LEGO drawing now implemented with pure BufferGeometry. I use extra index array to assign each vertex with histogram bin number, therefore I do not need normal geometry model for that. Still missing - highlight of the bins in such model, but this can be done separately.
I plan to implement TH3 drawing with the same approach.

@linev
Copy link
Member

linev commented Aug 10, 2016

With latest changes produced picture is very close to the original one:
http://jsroot.gsi.de/dev/?json=../files/th2ul.json.gz&opt=lego2,pal50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants