This is the 18th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021
Geogebra is an excellent mathematical drawing tool for describing and demonstrating mathematical images with interactive and powerful capabilities. This article describes how to embed geogebra in a Web page.
Requirements describe
The power of Geogebra enticed me to implement demo features in my blog, with some self-defined requirements:
- I can show you my own design
geogebra
Graphics; - Interactive control with slider;
- Can support animation automatic demonstration;
- Do not bring other edit controls, can only control my design part;
- Can control the display of graphics buttons;
- Do not rely on
geogebra
The official website, build their own services; - You can easily insert, edit and delete each demo content in your blog/web page.
- Don’t rely on shared links, only on actual demo information;
- The speed should not be too slow;
- Demo graphics should be centered.
Research report
I did a few days of research in order to meet the above requirements. There is very little and very mixed information on the Internet clearly about this matter. I have gathered the information I obtained here.
geogebra
-
Official website: www.geogebra.org/
-
The most popular versions are Geogebra 5 and Geogebra 6
-
Geogebra 5 is more classic and can export animations, while geogebra 6 does not support animation exports
-
Both export GGB files and HTML code
-
However, demo diagrams using official HTML code must have editing tool controls, and deletion will invalidate the graphics
desmos
desmos
Also similar to math sketchpad tool, load quickly, embed link sharing is very convenient, use logic andgeogebra
Almost the same- One issue that had to be deprecated was that the exported demo didn’t have sliders and couldn’t interact dynamically
Geogebra graphic information
- In fact, there is a fixed format for drawing graphic information
- In order to uniquely identify this information and quote it elsewhere, I am currently aware of four methods:
material_id
Some in:geogebra
The graphic on the official website has a fixed unique ID, which can be used as the identification to determine the contentGGB file
: a file that directly records and saves graphic informationGgbBase64 code
: a form of information storage in which graphic information is encoded as a stringGGB file
Are equivalent- Share link: you can upload the edited graphics
geogebra
The official website, the official website generated a unique link to return for sharing
- Of the four ways, sharing links is the most convenient and does not require any modifications to the blog/web project
iframe
Insert reference controls to import graphics directly from the official website - I do not know how to obtain the material_id. I do not know much about it, and since this ID does not contain any content information, I always feel unreliable
- I trust it
geogebra
Graphic reference form orGGB file
andGgbBase64 code
Reference mode of - Select the graphics shared by others and press the shortcut key
ctrl + shift + B
Can copy the graphggbBase64
code
Learning materials
geogebra
The production of thousands of tutorials, not in this table, this article focuses on graphics embedded web tutorial- Embedded into the official tutorial: wiki.geogebra.org/en/Referenc…
At present to meet my needs to see the most reliable webmaster, here thank god to share, we need to go to his site to learn
- kz16.top/
Also this big guy, in B station released the video tutorial, very conscience
- www.bilibili.com/video/av803…
Webpage embedding method
iframe
The iframe element creates an inline frame (that is, an inline frame) that contains another document.
To obtaingeogebra
The graphiciframe
code
- Open the
geogebra 6
(web version, client can be),www.geogebra.org/classicAnd edit the content - Get share link after share, replace
src
The content part - Here to blog.csdn.net/fatty_zhu/a…
<iframe scrolling="no" title=" src="https://www.geogebra.org/material/iframe/id/A25F9Tzs/width/1347/height/598/border/888888/smb/false/stb/false/stbh/f alse/ai/false/asb/false/sri/true/rc/false/ld/false/sdz/true/ctl/false" width="800px" height="400px"> </iframe>Copy the code
- The above code can be run in a separate HTML file
Official website JS parsing GGB file information
- Download the drawn graphics into
GGB file
format - To upload the file to the network (reading local files is not allowed), the link must be
http, data, chrome, chrome-extension, chrome-untrusted, https
One of the types. - Get the file link to my link photos.zywvvd.com/images_matr… As an example
- Paste code to an HTML file:
<script src="https://cdn.geogebra.org/apps/deployggb.js"></script>
<div id="ggbApplet"></div>
<script>
var parameters = {
"id": "ggbApplet",
"width":468,
"height":492,
"showToolBar":true,
"language":"zh",
"filename":"https://photos.zywvvd.com/images_matrixtime/20201219164932.ggb",
};
// is3D=is 3D applet using 3D view, AV=Algebra View, SV=Spreadsheet View, CV=CAS View, EV2=Graphics View 2, CP=Construction Protocol, PC=Probability Calculator DA=Data Analysis, FI=Function Inspector, macro=Macros
var views = {'is3D': 0,'AV': 0,'SV': 0,'CV': 0,'EV2': 0,'CP': 0,'PC': 0,'DA': 0,'FI': 0,'macro': 0};
var applet = new GGBApplet(parameters, '5.0', views);
window.onload = function() {applet.inject('ggbApplet')};
applet.setPreviewImage('data:image/gif;base64,R0lGODlhAQABAAAAADs=','https://www.geogebra.org/images/GeoGebra_loading.png','https://www.geogebra.org/images/applet_play.png');
</script>
Copy the code
The official website js parses ggbBase64 information
-
Actually follow the official tutorialWiki.geogebra.org/en/Referenc…
-
Obtaining ggbBase64 can be mapped on geogebra.kz16.top/ to get the code directly
-
You can also download the graphics into a web page. HTML format
- The result is the following code, which is pasted directly into an empty HTML file to run online.
<script src="https://cdn.geogebra.org/apps/deployggb.js"></script>
<div id="ggbApplet"></div>
<script>
var parameters = {
"id": "ggbApplet",
"width":468,
"height":492,
"showToolBar":true,
"language":"zh",
// use this instead of ggbBase64 to load a material from geogebra.org
// "material_id":"RHYH3UQ8",
// use this instead of ggbBase64 to load a .ggb file
// "filename":"myfile.ggb",
"ggbBase64":"UEsDBBQACAgIABxZk1EAAAAAAAAAAAAAAAAXAAAAZ2VvZ2VicmFfZGVmYXVsdHMyZC54bWztmk9z4jYUwM/dT+HRqT0EJIOBZOLsZHem08xks5km0+lV2MKoEZJrycHk01eWjG0WnAZDFpLdHCI/WX9/7+npSeb8YzZjziNJJBXcB6gDgUN4IELKIx+kanIyAh8vPpxHRERknGBnIpIZVj7w8pJlPS11Bi7M83Ac+yBgWEoaACdmWOVVfCAmE0Y5AY6TSXrGxQ2eERnjgNwFUzLD1yLAyrQ1VSo+63bn83ln2WtHJFFXNyy7mQy7UaQ6OgWOHjqXPigeznS7K7XnPVPPhRB1//5ybfs5oVwqzAM9ED2tkExwypTUj4SRGeHKUYuY+CAWlCvgMDwmzAe3ueT8OkkI+Q04RSVNC4KLD7+cy6mYO2L8Dwl0nkpSUtYzQjcvo19/FkwkTuKD4RA4kU3GPnA9T0Nj8RT7ANrCDC9I4jxiVubgVInA1De5E8wkWZbVPX0RIbFv+kV5TmcGpyMV0fqAHQQcGRMS6lGDYo7IqGdhNF1rMRAiCaWT+eAG3wBnUaRPNjVFDJ07+lR06tVz1YKR2tjPuwXYlyEOSUx4qAutcEatOA9GhnOejG3y2phfE3L/tSEPfkJugoy2p/yV19m6rdgi1zNwTfq9XMWbcBRX/E8S6THXGfd+Mt4r41UL7reiCw1b+EbJmiK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CHETZbARd6viw51PGecz70Ba3lHhGqctyf1UXd9Qo6XbYeTjqPIytyHRd7gxelBHY6nRRdpp2ucuewo505sSsQgnFg5U6jhBAn6r3GIRDRNkYvnQRMrb0tBPNBmMer5+0HamiW6d2Lz+ropDVoLuoMDAtkJi+pdtTA32DHrCJ6IT9rEPqHzHL/j+Ypf8hzI6YRDT9StR7HbciDi69W1jCNwK+g+O38D1kPUf3I9HHW9SNDzwegCzIPd1yHwrwA+HszxTk/rtZ1yZHTUBNuAUKv9/bzv2+j+51PdSNyJUhNsm8q/J/VY6BdvUFHVkqpLnr9dk4Y9rjTvf72PO/AVBLBwi8SnA4iQYAAPETAABQSwECFAAUAAgICAAcWZNRfBnMduoEAADxJQAAFwAAAAAAAAAAAAAAAAAAAAAAZ2VvZ2VicmFfZGVmYXVsdHMyZC54bWxQSwECFAAUAAgICAAcWZNRB4r7K1IDAAD2EAAAFwAAAAAAAAAAAAAAAAAvBQAAZ2VvZ2VicmFfZGVmYXVsdHMzZC54bWxQSwECFAAUAAgICAAcWZNR1je9uRkAAAAXAAAAFgAAAAAAAAAAAAAAAADGCAAAZ2VvZ2VicmFfamF2YXNjcmlwdC5qc1BLAQIUABQACAgIABxZk1G8SnA4iQYAAPETAAAMAAAAAAAAAAAAAAAAACMJAABnZW9nZWJyYS54bWxQSwUGAAAAAAQABAAIAQAA5g8AAAAA",
};
// is3D=is 3D applet using 3D view, AV=Algebra View, SV=Spreadsheet View, CV=CAS View, EV2=Graphics View 2, CP=Construction Protocol, PC=Probability Calculator DA=Data Analysis, FI=Function Inspector, macro=Macros
var views = {'is3D': 0,'AV': 0,'SV': 0,'CV': 0,'EV2': 0,'CP': 0,'PC': 0,'DA': 0,'FI': 0,'macro': 0};
var applet = new GGBApplet(parameters, '5.0', views);
window.onload = function() {applet.inject('ggbApplet')};
applet.setPreviewImage('data:image/gif;base64,R0lGODlhAQABAAAAADs=','https://www.geogebra.org/images/GeoGebra_loading.png','https://www.geogebra.org/images/applet_play.png');
</script>
Copy the code
Local JS parses ggbBase64 information
- Continue to act according to the official tutorial wiki.geogebra.org/en/Referenc…
- Mainly in the
Offline and Self-Hosted Solution
This part of - The need toDownload the relevant JS files(
deployggb.js
and5.0 / the web3d
) - configuration
deployggb.js
and5.0 / the web3d
The location of the - I will be
deployggb.js
On the/vvd_js/deployggb.js
Under;web3d
On the5.0 / the web3d / / vvd_js /
location - I will be
deployggb.js
On the/vvd_js/deployggb.js
Under;web3d
On the5.0 / the web3d / / vvd_js /
location - I will be
deployggb.js
On the/vvd_js/deployggb.js
Under;web3d
On the5.0 / the web3d / / vvd_js /
location - I will be
deployggb.js
On the/vvd_js/deployggb.js
Under;web3d
On the5.0 / the web3d / / vvd_js /
location
It is recommended to place them in the Source folder of the Hexo directory, and then set skip-render in the Hexo configuration file to save these JS files, which are compatible with all themes
- Algebraic area enter the formula y=ax+by= AX +by=ax+b to create the graph
- To center the image, add a style setting to the calling div module
style='margin:0 auto'
: - To sum up, attach the following code to the HTML:
<script src="/vvd_js/deployggb.js"></script>
<script>
var parameters = {
"id": "ggbApplet",
"width":500,
"height":500,
"showResetIcon":true,
"borderColor":"white",
"language":"en",
"ggbBase64":"UEsDBBQACAgIAA1ak1EAAAAAAAAAAAAAAAAXAAAAZ2VvZ2VicmFfZGVmYXVsdHMyZC54bWztmk9z4jYUwM/dT+HRqT0EJIOBZOLsZHem08xks5km0+lV2MKoEZJrycHk01eWjG0WnAZDFpLdHCI/WX9/7+npSeb8YzZjziNJJBXcB6gDgUN4IELKIx+kanIyAh8vPpxHRERknGBnIpIZVj7w8pJlPS11Bi7M83Ac+yBgWEoaACdmWOVVfCAmE0Y5AY6TSXrGxQ2eERnjgNwFUzLD1yLAyrQ1VSo+63bn83ln2WtHJFFXNyy7mQy7UaQ6OgWOHjqXPigeznS7K7XnPVPPhRB1//5ybfs5oVwqzAM9ED2tkExwypTUj4SRGeHKUYuY+CAWlCvgMDwmzAe3ueT8OkkI+Q04RSVNC4KLD7+cy6mYO2L8Dwl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GBApplet(parameters, '5.0');
applet.setHTML5Codebase('/vvd_js/5.0/web3d/');
applet.setHTML5Codebase('/vvd_js/5.0/web3d/');
window.onload = function() {applet.inject('ggbApplet')};
</script>
<div id="ggbApplet" style='margin:0 auto'></div>
Copy the code
Local JS parses GGB file information
- The same as the official website to parse GGB files, first obtain
GGB file
, upload the file and get the link - The above
ggbBase64
Replace withfilename
, attach a link, paste code to the page
<script src="{path to your deployggb.js}"></script> <script> var parameters = { "id": "ggbApplet", "width":500, "height":500, "borderColor":"white", "language":"en", "filename":"https://photos.zywvvd.com/images_matrixtime/20201219164932.ggb"}; Var applet = new GGBApplet(parameters, '5.0'); The applet. SetHTML5Codebase (' 5.0 / the web3d/'); window.onload = function() {applet.inject('ggbApplet')}; </script> <div id="ggbApplet"></div>Copy the code
Parameter Settings in the process of parsing GGB information
- Reference: wiki.geogebra.org/en/Referenc…
- Parameters can be set according to individual requirements
Name | Value | Description | Since |
---|---|---|---|
appName | eg "graphing" |
app name, default: “classic””graphing” … GeoGebra Graphing Calculator “geometry” … GeoGebra Geometry “3d” … GeoGebra 3D Graphing Calculator “classic” … GeoGebra Classic “suite” … GeoGebra Calculator Suite “evaluator” … Equation Editor | 6.0 |
width | eg 800 |
Applet width (compulsory field) | |
height | eg 600 |
Applet height (compulsory field) | |
material_id | eg "RHYH3UQ8" |
GeoGebra Materials id to load See first applet here: Dev.geogebra.org/examples/ht… | 5.0 |
filename | eg "myFile.ggb" |
URL of file to load See second applet here: Dev.geogebra.org/examples/ht… | 4.0 |
ggbBase64 | base64 encoded .ggb file | Encoded file to load. See the applet here: Dev.geogebra.org/examples/ht… | 4.0 |
borderColor | e.g. #FFFFFF for white |
Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | 3.0 |
enableRightClick | true or false |
States whether right clicks should be handled by the applet. Setting this parameter to “false” disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | 3.0 |
enableLabelDrags | true or false |
States whether labels can be dragged. Default: true | 3.2 |
enableShiftDragZoom | true or false |
States whether the Graphics View(s) should be moveable using Shift + mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to “false” disables moving and zooming of the drawing pad. Default: true | 3.0 |
showZoomButtons | true or false |
States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | 6.0 |
errorDialogsActive | true or false |
States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | 3.2 |
showMenuBar | true or false |
States whether the menubar of GeoGebra should be shown in the applet. Default: false | 2.5 |
showToolBar | true or false |
States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | 2.5 |
showToolBarHelp | true or false |
States whether the toolbar help text right to the toolbar buttons should be shown in the applet | 3.0 |
customToolBar | e.g. 0, 1, 2, 3, 4, 5, 6, 7 |
Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values.. adds a separator within a menu, ` |
starts a new menu and |
showAlgebraInput | true or false |
States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | 2.5 |
showResetIcon | true or false |
States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | 2.5 |
language | iso language string | GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | 2.5 |
country | iso country string, e.g. AT for Austria |
This parameter only makes sense if you use it together with the language parameter. | 2.5 |
id | eg applet2 |
This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page – see this example (will have no effect in earlier versions) | 3.2 |
allowStyleBar | true or false |
Default: false Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing) | 4.0 |
appletOnLoad | eg The function (API) {API. EvalCommand (' Segment ((1, 2), (3, 4)) '); } |
JavaScript method to run when the activity is initialized (and file loaded if applicable) | 5.0 |
useBrowserForJS | true or false |
When true, GeoGebraruns ggbOnInit from HTMLignores ggbOnInit from fileignores JS update scripts of objects in fileWhen false, GeoGebra:ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead)runs ggbOnInit from fileruns JS update scripts of objects in fileDefault: false | 4.0 |
showLogging | true or false |
Default: false Determines whether logging is shown in the Browser’s console | 4.2 |
capturingThreshold | integer | Default: 3 Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. | 4.4 |
enableFileFeatures | true or false |
Default: true Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. | 5.0 |
perspective | string | For values see SetPerspective_Command. Just for a blank start ie shouldn’t be used with material_id.filename or ggbBase64 parameters | 5.0 |
enable3d | true or false or none |
Whether 3D should be enabled (for exam mode). When neither true nor false are entered, user can decide in a dialog. | 5.0 |
enableCAS | true or false or none |
Whether CAS should be enabled (for exam mode). When neither true nor false are entered, user can decide in a dialog. | 5.0 |
algebraInputPosition | algebra .top or bottom |
Default: empty Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty, the position depends on file. | 5.0 |
preventFocus | true or false |
Default: false. When set to true, this prevents the applet from getting focus automatically at the start. | 5.0 |
scaleContainerClass | String | Name of CSS class that is used as container; applet will scale to fit into the container. | 5.0 |
autoHeight | boolean | • true to restrict the width of the applet and compute height automatically, add autoHeight:true • false if you want the applet to be restricted by both width and height of the container |
5.0 |
allowUpscale | true or false |
Default: false Determines whether automatic scaling may scale the applet up | 5.0 |
playButton | true or false |
Default: false Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. | 5.0 |
scale | number | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | 5.0 |
showAnimationButton | true or false |
Whether animation button should be visible | 5.0 |
showFullscreenButton | true or false |
Whether fullscreen button should be visible | 6.0 |
showSuggestionButtons | true or false |
Whether suggestion buttons (special points, solve) in Algebra View should be visible | 6.0 |
showStartTooltip | true or false |
Whether “Welcome” tooltip should be shown | 5.0 |
rounding | string | String composed of number of decimal places and flags — valid flags are “s” for significant digits and “r” for rational numbers. Hence “10” means 10 decimal places, “10s” stands for 10 significant digits. | 6.0 |
buttonShadows | true or false |
Whether buttons should have shadow | 6.0 |
buttonRounding | Number (0-0.9) | Relative radius of button’s rounded border. The border radius in pixels is buttonRounding * height /2 , where height Is the height of the button.default 0.2. |
6.0 |
buttonBorderColor | Hex color (#RGB .#RGBA .#RRGGBB or #RRGGBBAA ) |
Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | 6.0 |
editorBackgroundColor | Hex color | Background color of the evaluator app | 6.0 |
editorForegroundColor | Hex color | Foreground (text) color of the equation editor (appname = “evaluator”) | 6.0 |
textmode | false], default false | whether editor is in text mode or not (appname = “evaluator”) | 6.0 |
keyboardType | “normal”|”notes”] | Which keyboard is shown for equation editor (appname = “evaluator”) | 6.0 |
Hexo securely incorporates Geogebra best practices
- Personal preferred best practice path:
Graph TD A --> B -->C -->C -->D --> F -->C -->D -->D --> F C -- ggbBase64 code -->E[CTRL + Shift +B] --> G
- Advantages:
- Provide their own services, not bound by the official website
- Use graphic source files to provide a secure presentation
- Interactive, with sliders, to meet most presentation needs
- The process is relatively simple and clear
- Loading speed acceptable
- The same effect can be displayed on mobile phones
- The environment blends seamlessly into the Hexo blog environment
The resources
- www.geogebra.org/
- Blog.csdn.net/fatty_zhu/a…
- www.bilibili.com/video/av803…
- kz16.top/
- Wiki.geogebra.org/en/Referenc…