HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Masterjun

no profile record

comments

Masterjun
·vorig jaar·discuss
I think the original commenter is correct that there is a mistake in the perspective code. It seems the code calculates the linear interpolation for the grid points too late. It should be before projecting, not after.

I opened an issue ticket on the repository with a simple suggested fix and a comparison image.

https://github.com/tscircuit/simple-3d-svg/issues/14
Masterjun
·2 jaar geleden·discuss
He addresses this at 9:00 in the video. You're thinking of a function graph, but he never made a function. He just sets up a visualization of a set of 3D points.
Masterjun
·2 jaar geleden·discuss
Doesn't this miss the part where the 256x224 (8:7) output resolution gets stretched into a ~4:3 (actually 64:49) image?

The SNES has a dot rate of ~5.37 MHz which is slower than the square pixel rate defined by the ATSC standards of ~6.13 MHz. It's exactly 8/7 slower, so pixels are stretched horizontally by 8/7, causing the 8:7 resolution to be stretched to (8/7)*(8/7)=64/49, which is close to 64:48 = 4:3.

> Result in an aspect ratio close to 4:3. This would mean 224*(4/3) = 298 visible dots.

If you consider what I mentioned, the factor would be (4/3)/(8/7) = 7/6, so they would have to choose something closer to 224*(7/6) = 261.33... visible dots. Which is much closer to what they chose with 256.
Masterjun
·2 jaar geleden·discuss
Looking at the code, the issue is most likely a modification of window.location or its child properties. Any modification of these things will cause the browser to navigate to the new page, adding a new browser history entry. Then, whenever a user tries to go back, it will rerun the code that causes the browser to nagivate to the new page, so you end up on the same page you started on. It feels like the back button was hijacked.

To fix this, usually the two ways to change the URL without changing the browser history are either using window.location.replace() which will navigate there as well, or using window.history.replaceState() which will only change the URL without naviating there.
Masterjun
·3 jaar geleden·discuss
It seems I got an ambiguous sudoku puzzle. https://i.imgur.com/AUiLP7J.png

I read somewhere that sudoku puzzles should always only have one solution or they don't count as "real" sudoku puzzles.