https://github.com/archange-py/visuel
Flexible library of graphical algorithms in Python, providing mathematical classes such as vectors and points, speed-optimized graphical functions and much more ! It can be used on the Numworks calculator, or on a computer.
https://github.com/archange-py/visuel
graphics-library graphics-programming library numworks numworks-calculators python visuel
Last synced: about 1 year ago
JSON representation
Flexible library of graphical algorithms in Python, providing mathematical classes such as vectors and points, speed-optimized graphical functions and much more ! It can be used on the Numworks calculator, or on a computer.
- Host: GitHub
- URL: https://github.com/archange-py/visuel
- Owner: Archange-py
- Created: 2024-04-07T19:38:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T17:34:12.000Z (almost 2 years ago)
- Last Synced: 2024-08-05T20:35:16.317Z (almost 2 years ago)
- Topics: graphics-library, graphics-programming, library, numworks, numworks-calculators, python, visuel
- Language: Python
- Homepage:
- Size: 2.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Visuel
###
Welcome ! This project is intended for use in conjunction with Kandinsky on a laptop or Numworks calculator. It allows you to add graphical functions, mainly around new drawing functions like line or circle drawing, but also mathematical classes like vectors or points, and much more !
## Table of Contents
***
1. [General Info](#general-info)
2. [How to use it](#how-to-use-it)
3. [Examples](#examples)
3. [Tree Fractals](#tree-fractals)
5. [Extensions](#extensions)
6. [QR-Codes](#qr-codes)
7. [FAQs](#faqs)
## General Info
***
I recommend that you test the sample files on your computer, as you may be able to increase the speed.
To install it on the Numworks, we have the choice :
1. Just follow this link to the [Numworks website](https://my.numworks.com/python/archange/visuel)
2. you just need to copy and paste the code from this file: [visuel](Visuel.py) into a new script on your Numworks account. Then upload them to your calculator.
> Here's an example of what you can do with the calculator, using the [example file](visuel_first_example.py). Click [here](https://my.numworks.com/python/archange/example_visuel) to see it on the Numworks website.
If you have any questions, go to the [FAQs section](#faqs), or explore all the examples [here](#examples) after visiting this [page](#how-to-use-it) to install **kandinsky** and **ion** on your computer !
## How to use it
***
To use it properly you need to install several python packages on your computer whith the command line:
* [Kandinsky](https://github.com/ZetaMap/Kandinsky-Numworks) :
```
pip install kandinsky
```
* [Ion](https://github.com/ZetaMap/Ion-numworks) :
```
pip install --pre ion-numworks
```
And python, of course, [here](https://www.python.org/downloads/) if you don't already have it.
###
>You can change the emulator's OS by pressing "_CTR+O_" to increase speed, so you can get the most out of it without seeing everything slow down !
## Examples
***
First of all, after you're on your computer, you need to start by importing it after installing it in the current directory, and write that on the first line of your project:
```Python
from visuel import *
```
After that, you need to understand how this script is organized, with points and vectors for example, and how it works, with its functions. For this purpose, you have at your disposal one *Jupiter Notebook* containing everything that can be shown in writing for the file [visuel_example](visuel_example.ipynb). Then there are plenty of example files for everything to do with graphics. You can see the results with the following images :
* **Function interpolation** : [example_interpolation.py](/examples/example_interpolation.py)
Example 1
Example 2
Example 3
Example 4
* **Function expend** : [example_vectoriel_geometry](/examples/example_vectoriel_geometry.py)
* **Function findWithPoint** : [example_findwithpoint.py](/examples/example_findwithpoint.py)
* **Function alpha_pixel and argument "alpha" in draw function** : [example_alpha_layer.py](/examples/example_alpha_layer.py)
> We have to take a number less or equal to 0, and greater or equal to 1 for the alpha parameter
Example 1
Example 2
* **Function scatter** : [example_scatter.py](/examples/example_scatter.py)
Example 1
Example 2
Example 3
* **Function plot** : [example_plot.py](/examples/example_plot.py)
Example 1
Example 2
Example 3
* **Function set_lines** : [example_lines.py](/examples/example_lines.py)
Example 1
* **Function draw_points** : [example_point.py](/examples/example_point.py)
Example 1
* **Function draw_croix** : [example_croix.py](/examples/example_croix.py)
Example 1
* **Function draw_arrows** : [example_arrows.py](/examples/example_arrows.py)
Example 1
* **Function draw_vector** : [example_vectors.py](/examples/example_vectors.py)
Example 1
* **Function draw_droite** : [example_droite.py](/examples/example_droite.py)
Example 1
Example 2
* **Function fill_triangles** : [example_triangle.py](/examples/example_triangle.py)
Example 1
* **Function draw_polygone and fill_polygone** : [example_polygone.py](/examples/example_polygone.py)
Example 1
* **Function draw_circle and fill_circle** : [example_cercle.py](/examples/example_cercle.py)
Example 1
* **Function bezier curve** : [example_bezier_curve](/examples/example_bezier_curve.py)
Examples
Examples
Examples
## Tree Fractals
The link to the example script: [example_fractal.py](fractal_example.py)
And the source script: [fractal.py](fractal.py)
***
> Don't forget to install the lines extension ([here](./extensions/ext_lines.py)) in your computer !
Basics Tree
Palmier
Cyan Tree
Cyan Tree
Cyan Tree
Cyan Tree
Magenta Tree
Magenta Tree
Magenta Tree
Examples Trees
Examples Trees
Examples Trees
Angle Tree
Angle Tree
## Extensions
***
Here are some extensions designed to work with the calculator. However, the latest extension, Grapher, will only work on a computer. They include a number of extra features, notably a reproduction of the turtle module, and another, much simpler one, of the matplotlib.pyplot module. I'll let you discover them with some beautiful images!
> You need to copy and paste the code from the extension files into a new file created on the Numworks website.
* **Extension Lines** : [lines_example.py](/extensions/lines_example.py)
Example 1
* **Extension Ellipses** : [example_ellipse.py](/extensions/ext_ellipses.py)
Example 1
Example 2
* **Extension Turtle** : [turtle_example.py](/extensions/turtle_example.py)
> The turtle extension has both a compact and a non-compact file for use on the computer.
Example 1
Example 2
* **Extension Grapher** : [grapher_example.ipynb](/extensions/grapher_example.ipynb)
Keys
Short
Arrows [Up, Down, Right, Left]
allows you to move around the grapher
'Maj'+'=' or '+'
zoom in or out
'Maj'+'à' or '0'
refocuses the graphic
'Ctr'+'o'
changes the emulator, thus increasing speed
Examples :
## QR-Codes
***
Here are two QR codes to easily find the Visuel library on GitHub and on the official Numworks website. Use them without restriction!
GitHub
Numworks
## FAQs
***
A list of frequently asked questions (for the moment there is none).