# Python Demonstrations

The following have been designed to illustrate how to use Tychos to create various simulations, and demonstrates how certain Tychos specific objects and functions can be utilized.

### Scenario Objects

The following examples show many of the attributes that you can modify for each object, but it is not an exhaustive demonstration. Please refer to the [API](/docs/learn/language-reference-api.md) for more details on ALL of the attrbiutes that can be accessed and modified.

* [`circle()`](https://www.tychos.org/en/scenarios/K9sEk7)
* [`rectangle()`](https://www.tychos.org/en/scenarios/hQ3XjY)
* [`ellipse()`](https://www.tychos.org/en/scenarios/t6JTky)
* [`arc()`](https://www.tychos.org/en/scenarios/QEhIfn)
* [`line()`](https://www.tychos.org/en/scenarios/t9m6lJ)
* [`poly_line()`](https://www.tychos.org/en/scenarios/xTXhIZ)
* [`arrow()`](https://www.tychos.org/en/scenarios/dqRjf7)
* [`spring()`](https://www.tychos.org/en/scenarios/IcJDOC)
* [`label()`](https://www.tychos.org/en/scenarios/RbYpwQ)
* [`compound()`](https://www.tychos.org/en/scenarios/pRqBAF)&#x20;
* [`sprite`](https://www.tychos.org/en/scenarios/cV6JuG)
* tilemap (Coming soon)

### Scenario Object Special Attributes

These attributes require a bit more to understand and apply, and are not available to all objects, so we felt they deserved their own catagory:

* Transform -[`skew, flip, blur`](https://www.tychos.org/en/scenarios/WxCnQb)&#x20;
* Fill - [`radial_gradient()` and `linear_gradient()`](https://www.tychos.org/en/scenarios/L2bkZB)
* Blend Modes (coming soon).

### Scenario Object Mouse Event Handling

Mouse events can be handled with your own custom event handling functions for any of the Scenario Objects other than gradient objects.

* [Mouse Up and Mouse Down](https://www.tychos.org/en/scenarios/TtYoIp)
* [Hover Effects - Mouse Enter and Mouse Leave](https://www.tychos.org/en/scenarios/N2OAcz)
* [Clicking and Double Clicking](https://www.tychos.org/en/scenarios/6TcPFW)
* [Dragging](https://www.tychos.org/en/scenarios/sQnhmw)

### UI Widgets

These are various UI widgets that can be added to your scenarios. Some widgets can be used to display information, while others can be used for data input.

* [`meter()`](https://www.tychos.org/en/scenarios/KJo4Ez)
* [`gauge()`](https://www.tychos.org/en/scenarios/glAvna)
* [`toggle()`](https://www.tychos.org/en/scenarios/vjASaz)
* [`button()`](https://www.tychos.org/en/scenarios/9wC7VN)
* [`slider()`](https://www.tychos.org/en/scenarios/3bYaWd)
* [`menu()`](https://www.tychos.org/en/scenarios/r7j9MP)
* [`input()`](https://www.tychos.org/en/scenarios/3Fb5y4)
* control\_panel (coming soon)

### Keyboard and Mouse

Every scenario can access user input from the keyboard and the mouse.

* [`keyboard`](https://www.tychos.org/en/scenarios/Q1RtxU)
* [`mouse`](https://www.tychos.org/en/scenarios/inxJuv)

### Audio

You can add audio output to your scenarios through the audio object functions.

* [Oscillator](https://www.tychos.org/en/scenarios/sImfG2)
* [Tones and Sounds](https://www.tychos.org/en/scenarios/V8uSjN)

### Graphs and Charts

Data visualization tools can be used to plot points on a graph, create tables of data, or display information in a pie or bar chart.

* [`graph()`](https://www.tychos.org/en/scenarios/Ihl7m8)
* [`bar_chart()`](https://www.tychos.org/en/scenarios/SNzWo5)
* pie\_chart (Coming soon)
* table (Coming soon)

### Animation Basics

These scenarios demonstrate how you can animate the attributes of the scenario objects in order to create simulations, games or interactive digital art!

* [Increment and Decrement](https://www.tychos.org/en/scenarios/2x7ZTn)
* [Random Walker](https://www.tychos.org/en/scenarios/4oskQp)
* [Constant Velocity Motion](https://www.tychos.org/en/scenarios/Tmq0hz)
* [Accelerated Linear Motion](https://www.tychos.org/en/scenarios/OwTbSg)
* [Rotational Velocity](https://www.tychos.org/en/scenarios/ObiMoa)
* [Rotational Acceleration](https://www.tychos.org/en/scenarios/6sGQCw)

### Programming and Math

Some examples of prgramming and mathematical algorithms:

* [Conditional Statement](https://www.tychos.org/en/scenarios/07RL1j)
* [Stars](https://www.tychos.org/en/scenarios/OZrw64)
* [Colorful Bubbles](https://www.tychos.org/en/scenarios/x7A4gk)

### Using Goals (Teachers only)

This gives you an example of defining a goal for a scenario.

* [Goal Example 1](https://www.tychos.org/en/scenarios/UIiFuT)

### Physics

Some examples of using Tychos to model simulations using computational physics:

* [Modeling An Accelerating Object](https://www.tychos.org/en/scenarios/KoP1Ip)
* [Ball Rolling Off Platform](https://www.tychos.org/en/scenarios/xGIAuT)
* [An Elastic Body](https://www.tychos.org/en/scenarios/yvpYeu)
* [Block on a Ramp - Using Collision Algorithm to Model Normal Force](https://www.tychos.org/en/scenarios/GDuoK4#)
* [Dampened Oscillation](https://www.tychos.org/en/scenarios/XS4QHa)
* [Physical Pendulum](https://www.tychos.org/en/scenarios/acWGyZ)
* [Double Pendulum](https://www.tychos.org/en/scenarios/T6Cx3a)
* [Air Resistance on a Falling Object](https://www.tychos.org/en/scenarios/ircRs9)
* [Ice Sliding Off A Curved Surface](https://www.tychos.org/en/scenarios/gRfAOD)
* [Hear The Marbles Bounce](https://www.tychos.org/en/scenarios/F2y4Rw)

### Collisions

Tychos has a number of built in functions for detecting and helping you resolve collisions.

* [Collision Detection - rectangles](https://www.tychos.org/en/scenarios/rWoijg)
* [Particle in a Box - using a reflection algorithm](https://www.tychos.org/en/scenarios/YAqpcO)
* [Collision Example 1](https://www.tychos.org/en/scenarios/8m7Eqi)
* [Detecting Intersection Points](https://www.tychos.org/en/scenarios/94pOKr)

### Fun!

Have some fun!

* [Classic Lunar Lander Game](https://www.tychos.org/en/scenarios/5VAozO)
* [Follow](https://www.tychos.org/en/scenarios/CKgUsN)
* [Platformer Game with `sprites` and `tilemaps`](https://www.tychos.org/en/scenarios/mIHuzl)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tychos.org/docs/demonstrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
