> For the complete documentation index, see [llms.txt](https://docs.kivy.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kivy.fun/examples/gallery.md).

# Gallery

This gallery lets you explore the many examples included with Kivy. Click on any screenshot to see the code.

This gallery contains:

* Examples from the `examples/` directory that show specific capabilities of different libraries and features of Kivy.
* Demonstrations from the `examples/demos/` directory that explore many of Kivy's abilities.

There are more Kivy programs elsewhere:

* [Tutorials](/tutorials/pong.md) walks through the development of complete Kivy applications.
* Unit tests found in the source code under the subdirectory `kivy/tests/` can also be useful.

We hope your journey into learning Kivy is exciting and fun!

***

## 3D Rotating Monkey Head

**File:** `3Drendering/main.py`

This example demonstrates using OpenGL to display a rotating monkey head. This includes loading a Blender OBJ file, shaders written in OpenGL's Shading Language (GLSL), and using scheduled callbacks.

The `monkey.obj` file is an OBJ file output from the Blender free 3D creation software. The file is text, listing vertices and faces and is loaded using a class in the file `objloader.py`. The file `simple.glsl` is a simple vertex and fragment shader written in GLSL.

![3D Rotating Monkey Head](https://kivy.fun/doc/stable/_images/3Drendering__main__py.png)

***

## Widget Animation

**File:** `animation/animate.py`

This example demonstrates creating and applying a multi-part animation to a button widget. You should see a button labelled 'plop' that will move with an animation when clicked.

![Widget Animation](https://kivy.fun/doc/stable/_images/animation__animate__py.png)

***

## Suite of Application Builders

**File:** `application/app_suite.py`

This explores different methods of starting an application. If you run this without a command line parameter, you should see a menu in your terminal. You can also run this with a `r` parameter to pick a random method.

![Suite of Application Builders](https://kivy.fun/doc/stable/_images/application__app_suite__py.png)

***

## Application example using build() + return

**File:** `application/app_with_build.py`

An application can be built if you return a widget on `build()`, or if you set `self.root`.

![Application example using build() + return](https://kivy.fun/doc/stable/_images/application__app_with_build__py.png)

***

## Application built from a .kv file

**File:** `application/app_with_kv.py`

This shows how to implicitly use a `.kv` file for your application. You should see a full screen button labelled "Hello from test.kv".

![Application built from a .kv file](https://kivy.fun/doc/stable/_images/application__app_with_kv__py.png)

***

## Application from a .kv in a Template Directory

**File:** `application/app_with_kv_in_template1.py`

This example shows how you can change the directory for the `.kv` file. You should see "Hello from template1/test.ky" as a button.

![Application from a .kv in a Template Directory](https://kivy.fun/doc/stable/_images/application__app_with_kv_in_template1__py.png)

***

## Camera Example

**File:** `camera/main.py`

This example demonstrates a simple use of the camera. It shows a window with a button labelled 'play' to turn the camera on and off.

![Camera Example](https://kivy.fun/doc/stable/_images/camera__main__py.png)

***

## Bezier Example

**File:** `canvas/bezier.py`

This example shows a closed Bezier curve computed from a polygon. You should see a purple polygon, a red bezier curve computed from the polygon, and two sliders.

![Bezier Example](https://kivy.fun/doc/stable/_images/canvas__bezier__py.png)

***

## Canvas Stress

**File:** `canvas/canvas_stress.py`

This example tests the performance of our Graphics engine by drawing large numbers of small squares.

![Canvas Stress](https://kivy.fun/doc/stable/_images/canvas__canvas_stress__py.png)

***

## Circle Example

**File:** `canvas/circle.py`

This example exercises circle (ellipse) drawing. You should see sliders at the top of the screen with the Kivy logo below it.

![Circle Example](https://kivy.fun/doc/stable/_images/canvas__circle__py.png)

***

## FBO Canvas

**File:** `canvas/fbo_canvas.py`

This demonstrates a layout using an FBO (Frame Buffer Off-screen) instead of a plain canvas.

![FBO Canvas](https://kivy.fun/doc/stable/_images/canvas__fbo_canvas__py.png)

***

## Line (SmoothLine) Experiment

**File:** `canvas/lines.py`

This demonstrates the experimental and unfinished SmoothLine feature for fast line drawing.

![Line (SmoothLine) Experiment](https://kivy.fun/doc/stable/_images/canvas__lines__py.png)

***

## Lines Extended Demo

**File:** `canvas/lines_extended.py`

This demonstrates how to use the extended line drawing routines such as circles, ellipses, and rectangles.

![Lines Extended Demo](https://kivy.fun/doc/stable/_images/canvas__lines_extended__py.png)

***

## Mesh Test

**File:** `canvas/mesh.py`

This demonstrates the use of a mesh mode to distort an image.

![Mesh Test](https://kivy.fun/doc/stable/_images/canvas__mesh__py.png)

***

## Multitexture Example

**File:** `canvas/multitexture.py`

This example blends two textures: the image `mtexture1.png` of the letter K and the image `mtexture2.png` of an orange circle.

![Multitexture Example](https://kivy.fun/doc/stable/_images/canvas__multitexture__py.png)

***

## Repeat Texture on Resize

**File:** `canvas/repeat_texture.py`

This example repeats the letter 'K' (`mtexture1.png`) 64 times in a window. You should see 8 rows and 8 columns of white K letters.

![Repeat Texture on Resize](https://kivy.fun/doc/stable/_images/canvas__repeat_texture__py.png)

***

## Rotation Example

**File:** `canvas/rotation.py`

This example rotates a button using PushMatrix and PopMatrix. You should see a static button with the words 'hello world' rotated at a 45 degree angle.

![Rotation Example](https://kivy.fun/doc/stable/_images/canvas__rotation__py.png)

***

## Stencil Demo

**File:** `canvas/stencil_canvas.py`

This is a test of the stencil graphics instruction inside the stencil view widget. When you use a stencil, nothing will be drawn outside the bounding box.

![Stencil Demo](https://kivy.fun/doc/stable/_images/canvas__stencil_canvas__py.png)

***

## Tesselate Demonstration

**File:** `canvas/tesselate.py`

This demonstrates the experimental library for tesselating polygons.

![Tesselate Demonstration](https://kivy.fun/doc/stable/_images/canvas__tesselate__py.png)

***

## Texture Wrapping and Coordinates Example

**File:** `canvas/texture.py`

This example changes texture properties and the properties of its containing rectangle.

![Texture Wrapping and Coordinates Example](https://kivy.fun/doc/stable/_images/canvas__texture__py.png)

***

## Shuffled Camera Feed Puzzle

**File:** `demo/camera_puzzle.py`

This demonstrates using Scatter widgets with a live camera. You should see a shuffled grid of rectangles that make up the camera feed.

![Shuffled Camera Feed Puzzle](https://kivy.fun/doc/stable/_images/demo__camera_puzzle__py.png)

***

## Kivy Catalog

**File:** `demo/kivycatalog/main.py`

The Kivy Catalog viewer showcases widgets available in Kivy and allows interactive editing of kivy language code to get immediate feedback.

![Kivy Catalog](https://kivy.fun/doc/stable/_images/demo__kivycatalog__main__py.png)

***

## Multistroke Recognition Database Demonstration

**File:** `demo/multistroke/main.py`

This application records gestures and attempts to match them.

![Multistroke Recognition Database Demonstration](https://kivy.fun/doc/stable/_images/demo__multistroke__main__py.png)

***

## Basic Picture Viewer

**File:** `demo/pictures/main.py`

This simple image browser demonstrates the scatter widget. You should see three framed photographs on a background.

![Basic Picture Viewer](https://kivy.fun/doc/stable/_images/demo__pictures__main__py.png)

***

## Live Shader Editor

**File:** `demo/shadereditor/main.py`

This provides a live editor for vertex and fragment shaders.

![Live Shader Editor](https://kivy.fun/doc/stable/_images/demo__shadereditor__main__py.png)

***

## Showcase of Kivy Features

**File:** `demo/showcase/main.py`

This showcases many features of Kivy. You should see a menu bar across the top with a demonstration area below.

![Showcase of Kivy Features](https://kivy.fun/doc/stable/_images/demo__showcase__main__py.png)

***

## Touch Tracer Line Drawing Demonstration

**File:** `demo/touchtracer/main.py`

This demonstrates tracking each touch registered to a device. You should see a basic background image. When you press and hold the mouse, you should see cross-hairs with the coordinates written next to them.

![Touch Tracer Line Drawing Demonstration](https://kivy.fun/doc/stable/_images/demo__touchtracer__main__py.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kivy.fun/examples/gallery.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
