https://github.com/altunenes/sorceress

Coding optical illusions in Python and JavaScript

https://github.com/altunenes/sorceress

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: pubmed.ncbi, ncbi.nlm.nih.gov
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary

Keywords

illusion illusions neuroscience optical-illusion optical-illusions perception psychology vision

Keywords from Contributors

experimental-psychology images psychology-experiments
Last synced: 5 months ago · JSON representation

Repository

Coding optical illusions in Python and JavaScript

Basic Info
Statistics
  • Stars: 14
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
illusion illusions neuroscience optical-illusion optical-illusions perception psychology vision
Created over 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme Funding License

README.md

sorceress 1.8

PyPI version Jekyll site CI Downloads Build status

banner

Purpose of package

This package's purpose is to create optical illusions in a simple way. The package is written in Python. however, the repo also includes JavaScript. In explanations section, you can find the explanations of the illusions.

This package contains a collection of well-known visual illusions, as well as some lesser-known ones that are just as fascinating.

By using the code provided in the package, you can easily recreate the illusions and see how they work for yourself. Not only can you reproduce the illusions, but you can also experiment with them and modify the code to create your own variations.

With this package, you can dive deep into the world of visual illusions and learn more about how the human brain processes visual information.

Whether you're a researcher, a student, or just someone who loves illusions, this package has something for you. So if you're interested in exploring the mysteries of the human visual system, give it a try!

More importantly, we shouldn't take optical illusions as just fun. Optical illusions are visual phenomena that occur when our brain interprets information from our eyes in a way that is different from reality. These illusions can reveal a lot about how our brain works and how it processes visual information, which can help us understand the underlying mechanisms of human vision. Most of the optical illusions in this package are seriously researched in the neuroscience literature. And I must say that the "causation" of the most of effects is still debated in the literature according to my humble knowledge. Optical illusions are researching not only in human vision but in other animals. So we can get a lot of insights from an evolutionary perspective.

The difficulty of creating an optical illusion with code will depend on the specific illusion you're trying to create and your experience with coding. Some optical illusions may be relatively simple to implement, while others may be more complex and require a deeper understanding of graphics programming and the underlying principles of perception.To create an effective optical illusion, you (also me) need to understand the principles of perception and be able to use code to manipulate the visual information in a way that tricks the brain into seeing something that isn't actually there. This requires a deep understanding of the underlying mechanisms of perception and a lot of experimentation and trial and error to find the right combination of visual elements that creates the desired illusion.

Another challenge is that creating optical illusions often requires a high level of precision and control over the visual elements in an image. This can be difficult to achieve with code, especially if you're working with complex or dynamic images that need to be updated in real time.

Overall, creating optical illusions with code can be a challenging but rewarding task that requires a combination of technical skills, creativity, and an understanding of the underlying principles of perception (Bach, 2014).

For all optical illusions check this documentation: altunenes.github.io/sorceress/

Getting started🚀️

The package can be found on PyPI hence you can install it via pip.

pip install sorceress

```

importing

from sorceress import sorceress ```

Features

For the API, click here

  • Illusions in Python
    • chromatic
    • dotill
    • realtimegrid
    • addlines
    • eyecolour
    • dakinPex
    • bruno
    • dolboeuf
    • kanizsa
    • tAki2001
    • cafewall
    • ccob
    • ebbinghaus
    • whiteill
    • enigma
    • blackhole
    • colorgrids
    • munker
    • munker2
    • grids2
    • pareidolia
    • spirals
    • color negative
    • footsteps

Illusions in JavaScript

  • footsteps
  • thelilac
  • EyeMovements
  • spatialmotion
  • Motion Induced Blindness (2 versions)
  • Depth Perception
  • Speed of Rotation
  • hypnotic circle
  • Bright Illusion
  • Length Illusion
  • Crazy Sine Waves
  • Crazy EEG-Fourier
  • phimotion
  • colour adaptation

Illusions in GLSL/Shader - Asahi illusion

Examples

In this page, you can find all illusions, explanations, code, and how to use it. I show just a few examples on this page.

from sorceress import sorceress sorceress.chromatic("myimage.jpg",circle=False, method="CMCCAT2000", gif=True, Gifduration=7) sorceress.addlines("myimage.png",linecolour1=(0,255,0),linecolour2=(0,255,255),linecolour3=(255,0,0))

As you can see above, you can use the package in a very simple way. You will need to install the following packages to use the package. You will not need to import them, the package will do it for you.

pip install opencv-python pip install numpy pip install matplotlib pip install imageio pip install Pillow pip install colour-science pip install pygame

Contribution

Any contribution, bug report, or suggestion is always welcome <3

  • Main Maintainer: Enes Altun

Owner

  • Name: Enes
  • Login: altunenes
  • Kind: user

I like science, computers, and budgies :-)

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 334
  • Total Committers: 3
  • Avg Commits per committer: 111.333
  • Development Distribution Score (DDS): 0.563
Top Committers
Name Email Commits
Enes 5****s@u****m 146
altunenes e****2@g****m 124
Enes 5****t@u****m 64

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 month
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Ziko1555 (1)
Pull Request Authors
  • imgbot[bot] (4)
  • altunenes (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 54 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 28
  • Total maintainers: 1
pypi.org: sorceress

Python package for creating optical illusions

  • Versions: 28
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 54 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 15.2%
Average: 20.5%
Dependent repos count: 21.7%
Forks count: 22.6%
Downloads: 32.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • opencv-python *
sorceress/pyproject.toml pypi
  • pytest ^5.2 develop
  • python ^3.6
.github/workflows/jekyll.yml actions
  • actions/checkout v2 composite