Simulations -- Output to File

Frank shared this question 2 months ago
Answered

Given some composition of objects, I would like to modify some *input parameters* and see how the *output* changes. The relation of input and resulting output parameters shall be written to a file.


EXAMPLE: Area of rectangle depending on position of point A.


Point A is determined by its x and y coordinates. The edges of the rectangle are aligned with the edges of the coordinate system. Together with another point B, A spans the rectangle. The resulting rectangle has an area 'F'. Now, I would like to do something like the following


for x in range(0,5)

for y in range(0,5)

A = (x,y)

# Assume GeoGebra does all the adaptations.

myFile.write(x, y, F.area)

Comments (18)

photo
1

Sorry, but that does not help. I need to vary x and y automatically and write the result together with the values, automatically.

photo
1

This is a forum for questions to help to learn the using of GGB and is not for orders.

I think your question is: "is this possible with GGB"

The answer is: yes with different possibilities.

photo
1

Bonjour Noel,

Je pense que notre commanditaire pourrait mieux trouver votre trace dans le tableau (c'est plus proche d'une simulation).

Mais je pense qu'il est naturel pour lui que les valeurs soient synchronisées horizontalement. Ceci nécessite une initialisation dans "Go".

Personnellement, je trouve intéressante la possibilité d'ajuster la longueur du step ainsi que la possibilité de définir la zone bleue (pour A, avec R_1, R_3). Peut-être notre client commentera cette fonctionnalité (voir dans ce contexte aussi la vitesse, qui empêche la "simulation" de courir trop vite).

A propos de l'exportation/importation : Tout programme capable d'importer le format texte Excel peut également importer des données de tableaux à partir de GGB. D'ailleurs, je suppose qu'une exportation automatique (vers un fichier au format Excel) pourrait être possible avec une application GGB-WEB avec Java-Script. Mais pour le moment, je ne veux pas m'occuper de cette questions.

photo
1

Hi Raymond,


I wish Geogebra allow some form of export of Excel or csv files

photo
1

Hi Lewws

Manual it's possible like this:

  • Mark in the GGB-table the area you want export.
  • Press the keys Ctrl-c
  • Go to Excel
  • Mark there 1 cell (the left top corner you want make the copy)
  • Press the keys Ctrl-v

Note: the export-format in the clipboard is with "tab" between horizontal cells-neighbors.

photo
1

Thanks, Raymond."GGB-table" you refer to is the spreadsheet right?Tested with this, https://www.geogebra.org/m/ehsud2mh . Works.


But for this https://www.geogebra.org/m/e5UQWM5m (with TableText)

the numbers in d42022db5c62de7138208b51a05e07d4

TableText, cannot be copied.

photo
1

Quote: "GGB-table" you refer to is the spreadsheet right?

Yes, I mean spreadsheet (and only spreadsheet, so not TableText) ( pity)

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

Your lists have a dynamical length. So I think the best way to bring this data to the spreadsheet is in this post in this thread. And I think too the export of LaTex (formulas) to Excel is not possible (or is only a problem for me)

photo
1

Thanks again.

photo
1

Merci, pour la reponse. J'ai une derniere question: Comment pourrais je rassurer que l'increment e toujour '1' quand-t-il laisse une trace dans le tableau 'spreadsheet'. Dans le cas sur lequelle je travaille, ca ne fonctionne pas comme it faut.

photo
1

Sorry Rami,


I cannot send any artifacts to a public forum. The thing is that the slider that produces the iteration index does not necessarily increment by '1' when I push the animation triangle. I cannot control the increment by the 'Increment Field' and also the 'Speed' field does not allow me to setup a deterministic behavior.

photo
1

I made this Quiz https://www.geogebra.org/m/vgbqjavt I'm intrested to send the Student Name & Mark To a Google sheet Can You help

photo
1

Quote: "Dans le cas sur lequelle je travaille, ca ne fonctionne pas comme it faut."

Please send your GGB-File and describe what's wrong and what you expect instead.

photo
1

Sorry Rami,

I cannot send any artifacts to a public forum. The thing is that the slider that produces the iteration index does not necessarily increment by '1' when I push the animation triangle. I cannot control the increment by the 'Increment Field' and also the 'Speed' field does not allow me to setup a deterministic behavior.

photo
1

A CIA man complains to the dentist about his terrible toothache. Dentist: "Please Open the mouth". CIA man: "I have no right to do that. That could debunk me." (It's a royalty-free joke.)

I hope this post doesn't make me guilty of espionage. Because I'm trying to figure out what you're doing for your client.

.

My guesswork: You want to define equal distances on all sides of the triangle with dots.These points form the path for an animation.If this is not the case, you do not need to read any further.Instead, they can specify the problem more precisely.

.

The Problem is: the pathparameter on a poly-line is not proportional to the lenght of the full path.

See here(it's importand to understand this): https://wiki.geogebra.org/e...

This GGB-internal path parameter can be transformed to be proportional to the total length.

See the appendix for one of the possible solutions. Since this is not a business secret of your company, you should be allowed to ask questions about this solution. But presumably you may only talk about it as long as you have not yet built this solution into your protected product. (lol).

photo
1

Thanks for your help. Your sarcasm, though, is inappropriate. When you work for a company you have to comply to the business conduct, whether you consider it appropriate or not.

photo
1

If you consider it pointless in this situation, it would be up to you to put the topic up for discussion in the company.

photo
1

Frankly, I am disappointed that a helpful volunteer trying his best to help is so rudely dismissed by one who feels so entitled to be helped.

Stand apart a moment and read what the requestor has asked for.

Can you imagine his problem and help needed?


Apologies I have to speak up. Openness and willingness to help fellow users of whatever technical competence has made this a very great help forum all these years! Let's just be more respectful of our moderators and volunteers here!

photo
1

As far as i know: GGb does not support file reading/manipulating/writing (and i doubt that the JS commands within GGb support it). Furthermore GGb is not made for batch-processing (i use it only for prototyping of ideas e.g.). If you want a software that can do batch processing and file manipulation than use software capable of that (e.g. octave) or use a real programming language. A further possible way of sending and retrieving data from GGb is a web embedded form e.g..

And finally please do consider the software licencing.

Comments have been locked on this page!

© 2019 International GeoGebra Institute