Assigning a variable (calculated) value to a shape

Aarnout Brombacher shared this question 7 months ago
Answered

I need some help with GeoGebra “programming” I am trying to create a Pascal’s triangle with hexagons and am facing two distinct challenges:

First: I want each hexagon to have a value in it and I want that value to be the result of a calculation based on values in both other hexagons and constants introduced by sliders

Second: I want the interior colour of the hexagons to be a function of the “hexagon’s value”

I can find completed examples by other people (without being able to access the "coding"), but what I am struggling to find is guidance on how to do this coding.

I am reaching out to you in the hope that somebody can direct me to some tutorial/other user notes.

Comments (2)

photo
1
  1. Search with google "geogebra pascal triangle"
  2. For example you can find this (from Ben Sparks)
  3. click in the top right the 3 Points. Choose "Details"
  4. click "Download"
  5. click the checkbox "agree to terms....."
  6. click "Applet_1 (.ggb") for download.
  7. open with GGB5 or GGB6
  8. open Algebraview
  9. open ConstructionProtokoll and use the navigation

--------------------------------------------------------

check the objects in the sequence of ConstructionProtokoll

consult the GGB-Manual, try to undestand the sens of this object.

now you can ask more specific here in the forum.

photo
1

Dear Rami,

Many, many thanks -- a great start -- much to learn, but you really have me started. I am sure I will be back soon with more specific questions.

photo
© 2020 International GeoGebra Institute