GeoGebra Interactive, Server

99 views
Skip to first unread message

Aaron Greicius

unread,
Jun 22, 2022, 12:07:19 PM6/22/22
to PreTeXt support
Hi, 

I am having some trouble with a GeoGebra interactive. I am following the instructions from Interactive Elements, Server. In html format, I get a static image that cannot be manipulated: 

Here is the source:
<figure xml:id="fig_ortho_diag">
  <title>Eigenspaces of a symmetric matrix are orthogonal</title>
  <interactive xml:id="geogebra_ortho_diag" geogebra="zkqwe4mq" width="100%" aspect="4:3" label="geogebra_ortho_diag" />
  <caption>Eigenspaces of a symmetric matrix are orthogonal</caption>
</figure>

Rob Beezer

unread,
Jun 22, 2022, 12:47:07 PM6/22/22
to pretext...@googlegroups.com
Dear Aaron,

https://www.geogebra.org/material/iframe/id/zkqwe4mq

is static too. Can you send a "pure" link that shows us what you expect to happen?

Rob

On 6/22/22 09:07, Aaron Greicius wrote:
> Hi,
>
> I am having some trouble with a GeoGebra interactive. I am following the
> instructions from Interactive Elements, Server
> <https://pretextbook.org/examples/sample-article/annotated/section-interactive-server.html>.
> In html format, I get a static image that cannot be manipulated:
> http://linear-algebra.northwestern.pub/s_spectral_theorem.html#fig_ortho_diag
>
> Here is the source:
> <figure xml:id="fig_ortho_diag">
>   <title>Eigenspaces of a symmetric matrix are orthogonal</title>
>   <interactive xml:id="geogebra_ortho_diag" geogebra="zkqwe4mq" width="100%"
> aspect="4:3" label="geogebra_ortho_diag" />
>   <caption>Eigenspaces of a symmetric matrix are orthogonal</caption>
> </figure>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/bfad659f-cdfd-4839-8897-7b9100e5a3b2n%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/bfad659f-cdfd-4839-8897-7b9100e5a3b2n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Aaron Greicius

unread,
Jun 22, 2022, 12:57:10 PM6/22/22
to PreTeXt support
Sure thing: https://www.geogebra.org/m/zkqwe4mq

I wonder if I need to "publish" first. I just want the user to be able to rotate. (This may be an issue with my GeoGebra know-how.) 

Rob Beezer

unread,
Jun 22, 2022, 1:08:38 PM6/22/22
to pretext...@googlegroups.com
Thanks, that link rotates for me.

I'm now beyond my GeoGebra expertise. We use that "iframe" link, to ... embed in
an iframe. Not sure if this is broken PreTeXt-wide or if it is something
specific to your particular material.

On 6/22/22 09:57, Aaron Greicius wrote:
> Sure thing: https://www.geogebra.org/m/zkqwe4mq
>
> I wonder if I need to "publish" first. I just want the user to be able to
> rotate. (This may be an issue with my GeoGebra know-how.)
>
> On Wednesday, June 22, 2022 at 11:47:07 AM UTC-5 Rob Beezer wrote:
>
> Dear Aaron,
>
> https://www.geogebra.org/material/iframe/id/zkqwe4mq
> <https://www.geogebra.org/material/iframe/id/zkqwe4mq>
>
> is static too. Can you send a "pure" link that shows us what you expect to
> happen?
>
> Rob
>
> On 6/22/22 09:07, Aaron Greicius wrote:
> > Hi,
> >
> > I am having some trouble with a GeoGebra interactive. I am following the
> > instructions from Interactive Elements, Server
> >
> <https://pretextbook.org/examples/sample-article/annotated/section-interactive-server.html
> <https://pretextbook.org/examples/sample-article/annotated/section-interactive-server.html>>.
>
> > In html format, I get a static image that cannot be manipulated:
> >
> http://linear-algebra.northwestern.pub/s_spectral_theorem.html#fig_ortho_diag <http://linear-algebra.northwestern.pub/s_spectral_theorem.html#fig_ortho_diag>
>
> >
> > Here is the source:
> > <figure xml:id="fig_ortho_diag">
> >   <title>Eigenspaces of a symmetric matrix are orthogonal</title>
> >   <interactive xml:id="geogebra_ortho_diag" geogebra="zkqwe4mq" width="100%"
> > aspect="4:3" label="geogebra_ortho_diag" />
> >   <caption>Eigenspaces of a symmetric matrix are orthogonal</caption>
> > </figure>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt support" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-suppo...@googlegroups.com
> > <mailto:pretext-suppo...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/pretext-support/bfad659f-cdfd-4839-8897-7b9100e5a3b2n%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/bfad659f-cdfd-4839-8897-7b9100e5a3b2n%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/pretext-support/bfad659f-cdfd-4839-8897-7b9100e5a3b2n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pretext-support/bfad659f-cdfd-4839-8897-7b9100e5a3b2n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/97eafe9e-f261-420a-abaf-9205e5d22ef3n%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/97eafe9e-f261-420a-abaf-9205e5d22ef3n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Aaron Greicius

unread,
Jun 22, 2022, 1:23:35 PM6/22/22
to PreTeXt support
Thanks, Rob. I tried swapping the interactive out with 2d material made with the GeoGebra graphing app. Now you can indeed interact with the checkboxes and sliders, but you cannot zoom or drag. I will experiment with the settings on my GeoGebra material in the meantime. 

Sean Fitzpatrick

unread,
Jun 22, 2022, 1:33:56 PM6/22/22
to pretext...@googlegroups.com
If you have the .ggb file, I've been able to get a successful 3D GeoGebra interactive with the following:

    <interactive xml:id="geogebra-basis-cube" platform="geogebra" width="67%" aspect="1:1">
      <slate xml:id="basis-cube" surface="geogebra" source="images/basis_cube.ggb" aspect="1:1"/>
      <static>
        <image xml:id="img-basis-cube" width="67%" source="images/basis_cube.pdf"/>
      </static>
    </interactive>

But I should make some notes:

1. This was a 3D commutative diagram, showing change of basis, in the shape of a cube.
2. I've since replaced it with an Asymptote diagram, which looks a bit better, and behaves better (but is more difficult to create)
3. I think the "static" part is wrong. Or at least, it doesn't do what I thought it did.
Actually, I'm not really sure what static does.

Correct markup should use "preview" instead (Rob will tell you if I'm wrong):

    <interactive xml:id="geogebra-basis-cube" platform="geogebra" width="67%" aspect="1:1" preview="images/basis_cube.png">
      <slate xml:id="basis-cube" surface="geogebra" source="images/basis_cube.ggb" aspect="1:1"/>
    </interactive>

Note change from pdf to png. Without the 'preview' part, the CLI is going to try to run pageres, which I once got to work on Linux, but never on Windows.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/e3b1f3e9-6a40-4440-936f-d180d10a352dn%40googlegroups.com.

Alex Jordan

unread,
Jun 22, 2022, 1:40:52 PM6/22/22
to pretext...@googlegroups.com
When I go to
http://linear-algebra.northwestern.pub/s_spectral_theorem.html#fig_ortho_diag

I see a 2D GGB thing that I can play with, not that 3D one.

When I go to:
https://www.geogebra.org/material/iframe/id/zkqwe4mq

I cannot rotate, but I can click on the three points and manipulate
them. Are you sure that you cannot do that same manipulation? That URL
is all within www.geogebra.org so whatever is preventing rotation
seems to be some issue with GeoGebra.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/e2aa98d7-24c0-5839-3a70-8a4ee96489f5%40gmail.com.

Aaron Greicius

unread,
Jun 22, 2022, 2:05:59 PM6/22/22
to PreTeXt support
Yeah, I swapped out the 3d example with a 2d one to troubleshoot. In both examples the issue seems to be that you can manipulate (drag points, click boxes, etc.) but not do things like zoom, pan, and rotate. I agree the issue is definitely on the GeoGebra side. 

Perhaps I should just do this whole thing with Sage plot. Anyone know how to get subscripts in text3d (for my W_1 and W_{-1} labels)? (I see that LaTeX in text3d is not supported.)  

Sean Fitzpatrick

unread,
Jun 22, 2022, 2:09:13 PM6/22/22
to pretext...@googlegroups.com
When you put a GeoGebra material online, there are a number of options you can select, in terms of what features and interaction you want to enable.

If you go to your material and edit it, see if you can find an option to allow click to drag.

Sean Fitzpatrick

unread,
Jun 22, 2022, 3:02:08 PM6/22/22
to pretext...@googlegroups.com
Replying to the list (there were a couple of direct emails):

After testing with one of my books, and the most recent version of the CLI:

- for 3d materials hosted on geogebra.org, rotation does not work in a PreTeXT book
(but it does work if you visit that material directly on geogebra.org)
- for 3d materials provided in a <slate> using a local .ggb file, rotation works.

So it seems that best practice for GeoGebra 3d is to author using the GeoGebra Classic desktop app, and save as a .ggb.

Note that GeoGebra provides two GeoGebra classic options: GeoGebra 5, and GeoGebra 6.
This is *much* easier to do in GeoGebra 5.

GeoGebra 6 seems to be a glorified wrapper for the web app. It doesn't even give an easy "save as" option. I think you have to use "download as"...

Aaron Greicius

unread,
Jun 22, 2022, 3:07:41 PM6/22/22
to PreTeXt support
Thanks, Sean. I am experimenting now with .ggb files. I'll see if I can get it going. 

Aaron Greicius

unread,
Jun 22, 2022, 3:31:09 PM6/22/22
to PreTeXt support
Success (for the most part)! 
Using 
<figure xml:id="fig_ortho_diag">
  <title>Eigenspaces of a symmetric matrix are orthogonal</title>
  <interactive xml:id="geogebra_ortho_diag" platform="geogebra" width="100%" aspect="4:3">
    <slate surface="geogebra" material="zkqwe4mq" aspect="4:3" label="train-distance">
    enableLabelDrags(false);
    </slate>
  </interactive>

  <caption>Eigenspaces of a symmetric matrix are orthogonal</caption>
</figure>

I get graphics allowing zoom, pan, rotate! 

However, currently it also allows one to drag labels around, even despite the enableLabelDrags(false). I'll continue to tinker. Now I also need to sort out licensing issues. 

Thanks all.

Sean Fitzpatrick

unread,
Jun 22, 2022, 4:21:56 PM6/22/22
to pretext...@googlegroups.com
One other note: your figure should have a <caption>, but should not have a <title>.
I'm not sure about label. (I think that's something Rob is working on?)

Alex Jordan

unread,
Jun 22, 2022, 11:04:02 PM6/22/22
to pretext...@googlegroups.com
This is old, but seems related:
https://help.geogebra.org/topic/unable-to-rotate-3d-graphics-view-applet

It suggests that you go to some settings page where you manage this
Material and could check "Enable pan and zoom". That sounds different
from rotation but maybe GGB ties these things together.


On Wed, Jun 22, 2022 at 4:21 PM Sean Fitzpatrick
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/c253ba10-7e7d-074c-d406-2d76acdfbac0%40gmail.com.

Sean Fitzpatrick

unread,
Jun 22, 2022, 11:35:52 PM6/22/22
to pretext...@googlegroups.com
The material I tested had the box checked off for Enable Pan and Zoom but rotation didn't work if I used the online version in PreTeXt.

The ggb version did.

Reply all
Reply to author
Forward
0 new messages