(no subject)
Mar. 14th, 2023 01:20 pmFinal U*People CS*4406 assignment was to make a function plotter (with red, green, blue axis wayfinder thingie, which I could have used a pre-made one of if I could get ES6 module transpiling to work which I can't, a grid floor (re-used the same texture cribbed from the Amiga Boing! demo yet again even though I don't like it here), vector normal shading, transparency, rotating/zooming stuff, and dmonstrating a hyperbolic parabola to start:

End result could be much nicer and code could be much nicer, but it works, and only took the better part of one day though I may have been laying in bed thinking about it beforehand. Since the functions get eval'd as JS (and turned in to a function in the eval), you can use other JS functions like Math.random(), demonstrated there. Every one of these assignments, I get a little bit ahead of myself and wind up mucking with what we're supposed to do next week; last week, with the earth and moon demo, I decided that the moon should deform a little bit every orbit, cuz, craters, so I was already mucking with existing geometry. I could have written an expression parser, and in an earlier class that used Python, that was an assignment, to make a calculator that parses expressions, but instead, we did the quick and dirty. Nothing that looks hard was hard; it's the silly stuff. I spent too much time trying to get LineMaterial and line typed array geometry definitions to work and failing before giving up and making tiny cylinders for the x, y, z signpost thingie (almost impossible to see in that pic). Sure, there were lots of examples, but I'm using a slightly older Three.JS and stuff seems to change rapidly. There are a lot of examples, but they're mostly enormous, so paring them down successfully is a project, and small examples on the 'net don't indicate what version they're for but probably don't work. So, basics. Initially the little input library, which the three.js built-in examples use, my animation loop, and camera controls weren't playing nice together and I eventually restructured the program enough that it started working without ever figuring out what was wrong. I couldn't ditch the animate loop and have camera controls (orbit controls) re-render the scene on demand but I didn't try too hard there. It did take me a while to get creating the triangle mesh down that gets deformed which is silly because three.js would happily create it for me, then I could go back in a second pass and deform it according to function output. Anyway, even though it's ugly in more ways than one, I am please with this assignment. It's a better assignment than a texture of the earth's moon not being tidal locked.
http://slowass.net/~scott/tmp/
* trying to make stuff not searchable so delete this delete
opengl7.html
The cycle of snow, melt, snow, melt, snow melt is continuing to absurd lengths. I've lost track of how many times its done this now but it's been a lot. Several days ago, it snowed, and I checked the forecast, and the forecast was correctly predicting melt, now, melt, snow in the next 10 days.

End result could be much nicer and code could be much nicer, but it works, and only took the better part of one day though I may have been laying in bed thinking about it beforehand. Since the functions get eval'd as JS (and turned in to a function in the eval), you can use other JS functions like Math.random(), demonstrated there. Every one of these assignments, I get a little bit ahead of myself and wind up mucking with what we're supposed to do next week; last week, with the earth and moon demo, I decided that the moon should deform a little bit every orbit, cuz, craters, so I was already mucking with existing geometry. I could have written an expression parser, and in an earlier class that used Python, that was an assignment, to make a calculator that parses expressions, but instead, we did the quick and dirty. Nothing that looks hard was hard; it's the silly stuff. I spent too much time trying to get LineMaterial and line typed array geometry definitions to work and failing before giving up and making tiny cylinders for the x, y, z signpost thingie (almost impossible to see in that pic). Sure, there were lots of examples, but I'm using a slightly older Three.JS and stuff seems to change rapidly. There are a lot of examples, but they're mostly enormous, so paring them down successfully is a project, and small examples on the 'net don't indicate what version they're for but probably don't work. So, basics. Initially the little input library, which the three.js built-in examples use, my animation loop, and camera controls weren't playing nice together and I eventually restructured the program enough that it started working without ever figuring out what was wrong. I couldn't ditch the animate loop and have camera controls (orbit controls) re-render the scene on demand but I didn't try too hard there. It did take me a while to get creating the triangle mesh down that gets deformed which is silly because three.js would happily create it for me, then I could go back in a second pass and deform it according to function output. Anyway, even though it's ugly in more ways than one, I am please with this assignment. It's a better assignment than a texture of the earth's moon not being tidal locked.
http://slowass.net/~scott/tmp/
* trying to make stuff not searchable so delete this delete
opengl7.html
The cycle of snow, melt, snow, melt, snow melt is continuing to absurd lengths. I've lost track of how many times its done this now but it's been a lot. Several days ago, it snowed, and I checked the forecast, and the forecast was correctly predicting melt, now, melt, snow in the next 10 days.