Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Computer Science and Math and Stuff
1234567891011121314151617181920212223242526272829303132333435
Computer Science and Math and Stuff
2019-01-28, 8:33 PM #1241
Originally posted by Jon`C:
Not at all, this is a practical discussion. The perspective projection used for 3D games is based on a flat eye (~= your monitor). This causes severe distortions, which are especially bad with high FOV/ultra wide/VR.

After reading it again, I believe he is talking about orthographic projections, not perspective projections.


Well, okay, yeah a game which used orthographic projection would be very odd indeed. I suppose my post is exactly about the differences between orthographic and perspective projection when considering points at infinity. Perspective permits points at infinity being presented, which could be vanishing points (such processes seem to neglect a nice curvature in the lens for ease of drawing).

The way your flat monitor distorts your round game camera lens, your round eyes distort straight lines. That's why road lines converge in the horizon.

The thing that's weird about orthographic projection is in how it deals with points at infinity, mathematically speaking. If you're standing inside of a finite sphere, then everything makes sense: your Tait Bryan coordinates for your flat lens are in 1-1 correspondance with points on the sphere.

If you try to take the limit of this sphere as the radius goes to infinity, **** gets weird really ****ing fast. The property above I mentioned is one. You'd think your vision could converge toward any point at infinity on the infinity sphere by tracing a radius out. But unless your eye is at the exact center, the angle you need to look directly at that point literally doesn't exist. So while every Tait Bryan angle you can look at has stuff in it, there is a huge amount of that infinity sphere you just plain cannot see using real-valued angles.

What's weirder? Move a step in any direction, apply the same argument above. You can't see any point you could in the previous spot. If you tried to trace that line with your eyes, you'd converge back to the line you're at parallel to the previous line, which looks in a different spot. Basically, while you can indeed see points in every direction, what you see is precisely none of it (in the measure 0 sense).

This might be a way of cutting up S^2 into nonmeasurable sets. Nor am I sure such an object can exist or be well-defined, it may violate some other property I haven't considered. Assuming you can have a sphere with infinite radius, whatever properties it may have are seriously weird.
2019-01-28, 8:58 PM #1242
Orthographic projections are used in CAD, and by definition for any 2D game. Isometric games (like the old Ultimas, Sim Cities, Diablos, Civilizations) are a special case of orthographic. So it's not really that odd. At least, it's not that unusual.

As far as projective geometry goes: an orthographic projection is 'just' an affine transformation, so points at infinity behave accordingly (i.e. infinity times a positive number plus another number equals infinity). Perspective projection is not linear; in graphics programming, after applying the "projection matrix" (airquotes) the graphics hardware multiplies U by (1/U.w), which if f=1 is just U.z. So basically perspective projection means points converge toward 0 about as fast as 1/x does, where x is the distance. The point at infinity will only be non-convergent if the angle between you and the infinite-length line is greater than your field of view.
2019-01-28, 9:00 PM #1243
In case anyone is following that, when Reid says "measure 0" he means it has no area (in plane geometry these are (edit) points and lines).

Tait Bryan is a porn star.
2019-02-08, 9:09 AM #1244
BTW, as an addendum to the above. It's not as complex as I made it out to be. The issue is that parallel lines don't converge to the same point only in Euclidean space, which means to say, only points finitely far away carry the property. Once you add points at infinity, you are no longer in Euclidean space. I tried putting two notions together which don't agree naturally without doing the hard work.

The question is, then, what does convergence mean in a sphere of infinite radius? Convergence is a topological property, so we need to be able to define the set, define a topology on that set, and define (hopefully in a natural way) what it means for a line inside to converge to a point on the sphere.

Sparing the boring details, if you attempt this, you find two parallel lines don't converge only when single points on the infinite sphere are open. This, you might recognize, generates the discrete topology. The discrete topology is a bad result. With the discrete topology we are saying that, yeah, the lines don't converge to the same point, but they don't converge to the same point because no sequence converges to x except the sequence {x}. No interesting sequence converges to anything because it's a trivial topology.

Once you try to define a non-trivial topology, parallel lines converge to the same point. Which is also weird, but less weird.

The conclusion: "seeing at infinity" in Euclidean space is an ill-defined notion. Once you strip away intuitions and actually work out the topological properties (which a mathematician better than I would have done at step one), you see that things do indeed make sense.
2019-02-11, 8:13 AM #1245
[http://mathworld.wolfram.com/images/eps-gif/CantorFunction_1000.gif]

This is the Cantor function. It has derivative zero almost everywhere, i.e. everywhere outside of the Cantor set. It maps a measure 0 set to a measure 1 set. Name it f(x).

Then define a new function g(x)=f(x)+x, so we sort of stretch the plot of the above up by two. What changes? Well, the measure of the image is now 2. But the measure of the image of the Cantor set doesn't change, it's still measure 1. This is only kind of apparent if you imagine the flat sections as increasing like the function f(x)=x, where you can see now the complement of the Cantor set used to have measure 0 but now has measure 1.

So, this freak of nature function not only maps a measure 0 set to a measure 1 set, that measure 1 is invariant when you add any strictly increasing *everywhere differentiable* function to it. Now that's what I call straaaange.
2019-02-11, 8:52 AM #1246
Now that's waht I call whoa dude
2019-02-11, 9:01 AM #1247
Originally posted by saberopus:
Now that's waht I call whoa dude


Math is full of topics way stranger than any amount of potsmoking can achieve.
2019-02-11, 10:16 AM #1248
I also met lots of potheads in the math department.
2019-02-11, 10:18 AM #1249
Also if you go to UC Santa Cruz you can have math professors like Ralph Abraham.
2019-02-11, 11:16 AM #1250
Originally posted by Reid:
Math is full of topics way stranger than any amount of potsmoking can achieve.


this is like when ppl say 'who needs drugs when i can take a walk in the fresh air and just get high on life'
2019-02-11, 12:26 PM #1251
i get high on the holy spirit :colbert:
2019-02-11, 12:44 PM #1252
'Weirdness' in mathematics is probably just the arrogance of human intuition subject to logical scrutiny. The right thing to do is to admit that human intuition is faulty and move on.
2019-02-11, 12:46 PM #1253
Or maybe weirdness in mathematics is because our axioms have secret contradictions
2019-02-11, 12:48 PM #1254
We'll never know for sure, right?

https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems
2019-02-11, 12:50 PM #1255
Some of the weirdness definitely seems to be a mismatch between logic and geometric perception. For example, the Banach-Tarksi Paradox, where you can "disassemble" a ball and reconstruct it into two identical balls, is really not a paradox if you get past the naive temptation to think of physical balls.
2019-02-11, 12:53 PM #1256
I mean, math is definitely not like physics in that sense. Otherwise we'd have things like Banach-Tarski therapy for testicular cancer patients.

(OK, sorry.)
2019-02-11, 1:27 PM #1257
Alternatively, one could think of physics and math as different expressions of English law, applied to the physical world in the case of physics, and to the realm of arbitrary intuition in the case of math.
2019-02-11, 2:01 PM #1258
Originally posted by saberopus:
this is like when ppl say 'who needs drugs when i can take a walk in the fresh air and just get high on life'


who DOES need drugs when you could take a walk in the fresh air and get high on life?
2019-02-11, 2:05 PM #1259
Originally posted by Reverend Jones:
'Weirdness' in mathematics is probably just the arrogance of human intuition subject to logical scrutiny. The right thing to do is to admit that human intuition is faulty and move on.


This

Originally posted by Jon`C:
Or maybe weirdness in mathematics is because our axioms have secret contradictions


Possibly this but who knows lol. In any case the construction of Cantor's function doesn't depend on choice or any funky axioms, so you're looking at contradicting ZF. If ZF has a contradiction it's gotta be buried veeery deep. Since mathematics exploded, people became much more diligent at trying this sort of thing, so all of the elementary approaches have been exhausted and a few of the non-elementary ones.

Originally posted by Reverend Jones:


We'll know if someone derives a contradiction from the ZFC axioms, but we'll never know if one can never be derived
2019-02-11, 2:10 PM #1260
Originally posted by Reverend Jones:
Some of the weirdness definitely seems to be a mismatch between logic and geometric perception. For example, the Banach-Tarksi Paradox, where you can "disassemble" a ball and reconstruct it into two identical balls, is really not a paradox if you get past the naive temptation to think of physical balls.


Pretty much. It only sounds paradoxical if use colloquial language really inappropriately. I was thinking of this today. Banach-Tarski is often phrased as "cut" a sphere into finitely many pieces. But intuitively, I imagine cutting something like mapping an interval onto a surface and cutting along that. There's a kind of continuous/differentiable/1-manifold dimension to the intuition. When the cheeky ******* says "cut" in Banach-Tarski, what they mean is a peculiar, mathematics-specific partition only formulable properly in set theory. This has no intuitive physical interpretation so calling it cutting is more like wordplay than serious intuition.

But if they said "this particular mathematical notion of partitioning up mathematical objects is a bit unusual", no one would care would they?
2019-02-11, 2:42 PM #1261
Real talk though, going on long walks is truly awesome. And you do get high. Walking endorphins are real. It's also a huge boost to creative thought.



America needs more pilgrimages or at least more people walking around aimlessly. We'd be mentally better off.

Drugs are fine though, so long as you know, you study what you're planning to take and accept the risks. I would still recommend staying away from physically addicting substances despite that though.

BTW, remember how I posted here once about a family friend who got hooked on meth? He's dead. Turned up dead in San Diego a week ago. In two years went from a clean family man, you know, no serious behavioral issues, to destroying his family, career, and now literally his life. Never saw anything so dramatic, fast, or devastating in my life. So yeah, meth is bad. Also opiates seem really bad. But if you want to smoke pot or take acid, go ahead man it's not a big deal. Just go walking afterwards, the double high will rule.
2019-02-18, 8:36 PM #1262
Heh. I had two students email almost the exact same email asking for an online homework extension. They said "we are having a tough time because the content was not covered clearly in class". Hmm, well, I go check the student scores and the rest of the class (seriously, all of them) have completed it, with one at 82% but all of the rest at 90%+. So the vast majority of the class did the assignment with no issues.

I granted them the extension because I'm not an ******* towards my students, but I worded my email to remind them that office hours exist if they'd like explanation on lecture. The politest way of saying "if you're not understanding something come ask me, don't blame my lecture *******" I could think of.

I guess I am becoming an academic. Passive aggressive emails are the sign.
2019-02-18, 8:55 PM #1263
The worst I've seen is a professor sending out an email asking people NOT to schedule seminars in house PLEASE when guest lecturers arrive so that people won't be drawn away and embarrass the guest. To the whole department nonetheless.
2019-02-20, 12:23 PM #1264
If you've ever wondered about why ⊗ is used as the symbol for a tensor: it makes sense to think of tensors as products in some sense. If we think of the area of a rectangle as the lengths of its sides a and b, then we express it as ab, the product of the side lengths. Instead denote it as a⊗b.

Now take another rectangle of side lengths a and c. Since the lengths c and b are abstract, in general we can't "pair up" the sides b and cwith each other to figure out the area of a⊗b and a⊗c. However, since both have a as a side length, we could put the rectangles together along their a-length boundary. What we get is something of area a(b+c). Expressed with our tensor notation above,

a⊗b+a⊗c=a⊗(b+c)

As well, the same would be true of some areas a⊗c and b⊗c:

a⊗c+b⊗c=(a+b)⊗c

Thus we get the bilinearity property of tensor products.

Now consider what happens when you "scale" a rectangle a⊗b. If we want to double its area (so instead of ab we have 2ab), then we can distribute the 2 in any number of ways between a and b so long as the coefficients multiply to two. 2(a⊗b)=2a⊗b=a⊗2b=√(2)a⊗√(2)b. Thus the ring action distributes.

Of course, if we have areas c⊗d and a⊗b without any knowledge of how a,b,c,d interact, then we write the area of c⊗d and a⊗b together as:

c⊗d+a⊗b

This is why in general tensors are not primitive tensors but are expressed as sums of tensors.

All tensors do is take some primitive notions about how areas, volumes, etc. work and apply them to spaces more abstractly. So A⊗B for vector spaces is simply a way of "areas between the vectors of two spaces", without all of the gritty work of calculation getting in the way.

In case you were curious why we use circle-times as our notation. (a nice analogy holds for this in the direct sum, but it's easier to see).
2019-02-21, 6:51 AM #1265
[https://i.redd.it/ajuaqnthjef21.jpg]
2019-02-21, 6:51 AM #1266
it's funny because the programmer is bad
2019-02-28, 2:40 PM #1267
Reposting:

Currently using GNU C++ compiler, Notepad++ as an editing environment and use windows batch files for compiling and linking commands. It seems obvious this setup is not the best thing to have, so what are all the cool kids using now for C++?
2019-02-28, 2:54 PM #1268
Vim, bash, and make, man.
2019-02-28, 3:04 PM #1269
C++ tooling is an unbridled cluster****. You haven’t given nearly enough information about your needs to get a good recommendation.

If you are a beginner or intermediate C++ developer, you are developing exclusively on Windows, and you are okay with an editor that is very GUI, you should just use Visual Studio.
2019-02-28, 3:21 PM #1270
Originally posted by Brian:
Vim, bash, and make, man.


Doesn't it take time to learn Vim? Bash is of the question, this is a MinGW install on Windows. And I should probably get into using makefiles but I tend to have rather small projects with few dependencies. It's not a big deal for me to manually write the compiler instructions.

Originally posted by Jon`C:
C++ tooling is an unbridled cluster****. You haven’t given nearly enough information about your needs to get a good recommendation.

If you are a beginner or intermediate C++ developer, you are developing exclusively on Windows, and you are okay with an editor that is very GUI, you should just use Visual Studio.


Why would Visual Studio be preferred?

I know I would get access to some nice libraries, so there's that. Otherwise though I find it more annoying to click through menus on compiler than to manually set up my environment.
2019-02-28, 3:28 PM #1271
The C++ “cool kids” are just the people using C++latest. There is no standard workflow. There is no most popular editor. There is no build system with even a clear plurality.

IDEs are gradually standardizing on CMake for build description interop (but not the build itself). CMake isn’t great but it’s the best choice right now if you want a portable build. If you’re using Visual Studio you should probably stick to msbuild (the default built in option). If Xcode, whatever it does by default. Otherwise CMake. There is very little reason to write makefiles by hand for building C++ today. Makefiles are the least portable and most error prone option today.

Generally people on Linux use G++ (GCC), Mac use Clang (Xcode package symlinks cc/gcc/g++ to Clang, so you’re probably using it even if you think you aren’t), Windows use Visual C++ (Visual Studio). Recent versions of any of these compilers are very good. Visual C++ has historically had the worst standard compliance, but they have made great improvements in the last few years.

Clang works on Linux, but compatibility with libstdc++ is questionable. G++ works on Windows but uses libstdc++ instead of the Microsoft one, and the mingw runtime/glibc port instead of the Visual c++ runtime. Because of the way C++ was designed, if you want to link to other C++ libraries you all need to use the same C++ standard library. This is worse on Linux because of how its linker works. There are also issues with mingw about debug information and exceptions, and... well, it’s really not worth dealing with any of this. If you should be using an unconventional compiler you’ll know.
2019-02-28, 3:34 PM #1272
I'd say your first problem is using Windows, and your second is using C++. Just switch to Emacs and Ocaml already.
2019-02-28, 3:41 PM #1273
Originally posted by Reid:
Why would Visual Studio be preferred?

I know I would get access to some nice libraries, so there's that. Otherwise though I find it more annoying to click through menus on compiler than to manually set up my environment.
because Visual Studio is the easy way to build code with the Visual C++ compiler. Msbuild (Visual studio build system) projects are onerous to edit by hand, and while you can run CL directly under your own build system this is not a workflow that Microsoft spends much time thinking about. The way MSVC works is at right angles to the way things are traditionally built with makefiles, they do not properly test the command line switches you need to use to get this working (especially in parallel builds), and without the aggressive batching msbuild performs (that no other canned build system does) you can’t get good build performance under Windows. They expect you to run it under Visual Studio with a bunch of undocumented environment variables set, using msbuild for batching and the proper subset of switches that msbuild uses, and with tracker.exe attached.

That’s not to say it’s impossible. It’s just a bad experience. It’s not worth doing unless you can’t avoid it. But you need to use CL if you want compatible debug information, to catch exceptions from other libraries, to link to libraries that use std::string as part of their interface (or occasionally even internally....)
2019-02-28, 3:48 PM #1274
It takes time to learn anything. All make is is a bunch of embedded bash anyway. I was only joking, I don't know any C++ beyond what I learned in school eons ago.
2019-02-28, 3:50 PM #1275
Make is actually quite a deep but remarkably simple idea (it's basically a DAG), so it's also worth understanding for its own sake and beyond.
2019-02-28, 7:02 PM #1276
I’m not gonna **** all over a piece of software that has worked fine for many people for decades. What I will say is that many common build needs violate the fundamental assumptions of Make, causing it to break in surprising ways for people not aware of how the tool really works.

Among other things, we are talking about C++. Make is not going to be able to build C++20 modules under the most performant implementation proposal. So, from a purely C++ perspective, Make and all other alpha-type build systems are on borrowed time and therefore are really not worth learning if you intend to stick with C++ and aren’t going to apply your knowledge for other kinds of build.

(Noob trap: Make isn’t a DAG, it’s a directed forest of targets. It assumes a 1:1 correspondence between targets and recipes.

What does the following do?

Code:
foo.txt bar.txt: input.json
    ./generate-files < input.json

.PHONY: all
all: foo.txt bar.txt


This makefile runs ./generate-files twice.

It’s also an error if multiple recipes generate the same target. So even if it could handle the above idea the way you expect, any build that generates targets lazily (which is very helpful for high concurrency) is off the table. You basically have to leave that stuff out of your Makefile build system entirely.

Both of these things are gonna be required for C++ modules, so bye-bye make.)
2019-02-28, 8:17 PM #1277
This sorta circles back to the discussion about why you should use msbuild with Visual C++: Windows has staggering process creation overhead. Visual C++ has gone through a bunch of scalability iterations, but the current best tested model is project level parallelism with msbuild automatically batching CL invocations. Trying to build things the intuitive make way on Windows is brutal.

Like, the standard for makefiles is to run GCC twice per TU, once to generate header dependencies and a second time to compile an object. Windows has neither the process overhead nor the IO overhead for that ****.
2019-02-28, 9:13 PM #1278
In all honesty, the last actual Makefile I wrote was to LaTeX compile my resume. Pretty much every programming language I've used has its own preferred build system, even if the basic idea goes back to Make.
2019-02-28, 10:03 PM #1279
Originally posted by Jon`C:
The C++ “cool kids” are just the people using C++latest. There is no standard workflow. There is no most popular editor. There is no build system with even a clear plurality.


Alright then. I still don't see if there's any particular reason to buy a Visual Studio License when the Gnu compiler does what I want, though.

Originally posted by Reverend Jones:
I'd say your first problem is using Windows, and your second is using C++. Just switch to Emacs and Ocaml already.


Mostly laziness. I'm familiar with Windows tools, and while I technically do know a bit about Linux, I'm not in the area to set up a new OS and tinker with it.
2019-02-28, 10:20 PM #1280
You should try Windows RG.
1234567891011121314151617181920212223242526272829303132333435

↑ Up to the top!