RealityBending / Pyllusion

A Parametric Framework to Generate Visual Illusions using Python
https://realitybending.github.io/Pyllusion/
MIT License
57 stars 9 forks source link

Ponzo Illusion errors #4

Open cratlagh opened 3 years ago

cratlagh commented 3 years ago

I considered raising this as a bug but not sure it should be classed as one since it makes sense that it is happening.

The Ponzo illusion: anything > 25 for the 'illusion_strength' parameter sees either the top target line draw over the flanker contextual lines, or as the number increases further, sees the contextual lines dip below the top target line. It would be cool if the flanker lines moved up the y-axis (or the target lines moved down the y-axis) to accommodate these extreme values.

I'd imagine it would be a relatively easy adjustment to make?

Additionally, when the 'illusion_strength' value is set to '90' it returns an error whereas >90 does not.

This is the error t returns: 'SystemError: <method 'draw_lines' of 'ImagingDraw' objects> returned a result with an error set'

Brilliant job all round with this package. Keep up the good work!

DominiqueMakowski commented 3 years ago

The Ponzo illusion: anything > 25 for the 'illusion_strength' parameter sees either the top target line draw over the flanker contextual lines

You mean like to keep the target lines "between" the contextual lines? We could have an argument like adjust_height that would automatically put the horizontal lines at the optimal position (there is something similar implemented in delboeuf). It would be a bit of a math headache to figure out the formula to adjust the height based on the size but it's doable ^^

when the 'illusion_strength' value is set to '90' it returns an error

that's weird, my gut feeling would be it that it has something to do with the transformations to radians or something... need to trace down the error to find its cause