Help with Contour draw function

21 views
Skip to first unread message

Anit Renad

unread,
Jul 18, 2022, 10:56:39 AM7/18/22
to Jzy3d
I've been working on trying to make a contour graph similar to the ones found in earlier demos, but I'm having a hard time using the draw function to make the 2d image on the bottom of the graph. I try using chart.getPainter() and a couple other variants with the draw functions but I keep getting NullPointerException errors. What kind of painter do I need to use?

Martin Pernollet

unread,
Jul 18, 2022, 4:57:07 PM7/18/22
to jz...@googlegroups.com
Hi ,

I am far from my computer still for a few day.

I recognize that the contour plot misses non regression tests and may have been altered by past refactoring.

May I ask you to create a bug report indicating the stack trace you encounter ? This will be a good reminder for me to fix this soon.

Le lun. 18 juil. 2022 à 16:56, Anit Renad <mark...@gmail.com> a écrit :
I've been working on trying to make a contour graph similar to the ones found in earlier demos, but I'm having a hard time using the draw function to make the 2d image on the bottom of the graph. I try using chart.getPainter() and a couple other variants with the draw functions but I keep getting NullPointerException errors. What kind of painter do I need to use?

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/jzy3d/024ac38c-6e86-4ff7-91c2-5066fc73655en%40googlegroups.com.

Martin Pernollet

unread,
Jul 19, 2022, 3:41:45 AM7/19/22
to jz...@googlegroups.com
And sorry I did not answer your question. You do not have to choose a painter. The painter is either NativeDesktopPainter for JOGL or EmulGLPainter for EmulGL.

The contour charts have been created based on JOGL so the refactoring may allow to compile and start contour charts on EmulGL, but these won’t work : EmulGLPainter misses the implementation of texture rendering required for contour plots .

Anit Renad

unread,
Jul 19, 2022, 9:40:49 AM7/19/22
to Jzy3d
If what I am understanding is correct, chart.getPainter() and chart.getView.getPainter() cannot be use since they are EmulGL. Do you have any suggestions on what class or function would be good to use for the Painter?

Also here is the stack trace:

Exception in thread "main" java.lang.NullPointerException
at org.jzy3d.painters.NativeDesktopPainter.glLineWidth(NativeDesktopPainter.java:305)
at  org.jzy3d.primitives.LineStrip.drawLine(LineStrip.java:153)
at  org.jzy3d.primitives.LineStrip.draw(LineStrip.java:121)
at  org.jzy3d.primitives.Composite.draw(Composite.java:100)
at  org.jzy3d.primitives.axis.ContourAxisBox.drawMesh(ContourAxisBox.java:117)
at org.jzy3d.demos.misc.ContourLinesDemo.init(ContourLinesDemo.java:83)

Martin Pernollet

unread,
Jul 29, 2022, 9:06:28 AM7/29/22
to jz...@googlegroups.com
Hi,

I have run the contour demos from the developer guide and they're not crashing as you mentioned.

There is no "ContourLinesDemo" in the guide, maybe this program was written by someone else?

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages