104 comments

[ 3.2 ms ] story [ 195 ms ] thread
I loved tixy when I first discovered it a few years ago so created this https://www.mathsuniverse.com/tixy (with permission from the original author) with puzzles to solve on the tixy grid. I use it with my computer science students who get really into it.
> In computer graphics, the origin (0, 0) is top-left rather than bottom-left

Umm...

What's wrong with that statement? It has historically and traditionally been true for raster displays, even if there do exist ways to use standard Cartesian-style coordinates with a computer.
There top left has usually been (0, 0) for hardware pixel coordinates (although even then there’s plenty of exceptions, e.g. mode 13h scrolling) but as a blanket statement about computer graphics in general it’s misleading.
I'm struggling to see the problem with this statement, other than maybe to add in the word "usually". My students will know of graphs in maths where the origin is always bottom left. When working with HTML canvas and every other computer graphics situation I've worked in, it's top left instead.
"PostScript uses a coordinate system where the origin is at the bottom-left corner of the page, with the x-axis increasing to the right and the y-axis increasing upwards."

Oscilloscopes use middle-left.

Unreal engine and SketchUp use Screen middle with xy increasing to the right.

in AutoCAD, the user coordinate system is 1/3 of the screen to the left for the origin, with X increasing to the right, and Y increasing upwards.

Almost all raster displays, and memory based programs assume top left, because that is how it was done first - counter intuitive.

It it not counter intuitive and the decision extends far earlier than the first displays.

A raster image onscreen is displayed in the order that the data appears when written down. It stands to reason that a data depiction should be in the same orientation as the display orientation. Displays were created by people who read from left to right, top to bottom. If the displays did not follow that order. images would be flipped or rotated when displayed in a data form.

The first pixel written to the display is in the top left because we read from the top left. If writers of another language had have popularised the text, perhaps things might have been different.

Why does the BMP file format store the image upside-down though?
> When working with HTML canvas and every other computer graphics situation I've worked in, it's top left instead.

In OpenGL is (center, center)

Fun. Thanks!

Works well on phone. The phone keyboard is a bit clumsy but it works (that’s a phone issue)

Why isn't "(sin(i) * (x > 7)) - (i == 5) + (i == 20) + 0.5 * (i == 32)" a solution to puzzle 36?
My 5yo did great on these until he hit #7 and got stuck! I’m helping him with syntax but trying to hold back from giving conceptual hints for now.

I love the instant visual feedback!

I've been programming for over 40 years, and I can say this is the most fun way I've experienced to learn this kind of thing. It really is fun.
i don't even know whats happening but its mesmerizing https://tixy.land/?code=sin%28i*t%2F128%29
It draws a slightly tilted sine wave gradient (i=16y+x so atan(1/16) ≈ 3.6°) whose frequency increases until it starts to alias due ro the limited resolution (cf. Nyquist sampling theorem) and exhibit what’s essentially the wagon wheel effect [1]. Nice illustration of signal processing fundamentals!

[1] https://en.m.wikipedia.org/wiki/Wagon-wheel_effect

Would be cool to implement this physically as an array of iris diaphragms
I’m considering that as a load screen animation. Bunch of different functions, and the user will be entertained.
I managed to come up with a suffix that displays outputs of my own weird thing in a tixy style.

https://c50.fingswotidun.com/show/?code=28*ddx*%24%3Ay*%243o...*

Quite a fun challenge.

The Suffix is 2<02->P8dus:vs

which is

  2<02->    clip to -2 to +2

  P8*d  2 copies of 8*PI

  u*s   8 horizontal sine 

  :v*s  8 vertical sine

  *  mix horz and vert to make the tixy circles.
(comment deleted)
(comment deleted)
really impressive, keep up the good work
That's fantastic!

I would love something like this in my living room. Especially if it is not just a screen. Maybe a grid of 256 screens? Or inflating balloons? Something easier to make? Just on/off big pixels?

> // hit "enter" to save in URL

There's no enter on Android Chrome on phone.

The enter key on the phone keyboard works if you tap that message.