Update
parent
22962b0e7e
commit
7cc9a92dc8
@ -1,21 +1,21 @@
|
||||
# Collision Detection
|
||||
|
||||
Collision detection is an essential problem e.g. of simulating physics of mechanical bodies in [physics engines](physics_engine.md) (but also elsewhere), it tries to detect whether (and also how) geometric shapes overlap. Here we'll be talking about the collision detection in physics engine, but the problem appear in other contexts too (e.g. [frustum culling](frustum_culling.md) in [computer graphics](graphics.md)). Collision detection potentially leads to so called *collision resolution*, a different stage that tries to deal with the detected collision (separate the bodies, update their velocities, make them "bounce off"). Physics engines are mostly divided into 2D and 3D ones so we also normally either talk about 2D or 3D collision detection (3D being, of course, a bit more complex).
|
||||
Collision detection is an essential problem e.g. of simulating physics of mechanical bodies in [physics engines](physics_engine.md) (but also elsewhere), it tries to detect whether (and also how) geometric shapes overlap. Here we'll be talking about the collision detection in physics engines, but the problem appears in other contexts too (e.g. [frustum culling](frustum_culling.md) in [computer graphics](graphics.md)). Collision detection potentially leads to so called *collision resolution*, a different stage that tries to deal with the detected collision (separate the bodies, update their velocities, make them "bounce off"). Physics engines are mostly divided into 2D and 3D ones so we also normally either talk about 2D or 3D collision detection (3D being, of course, a bit more complex).
|
||||
|
||||
There are two main types of collision detection:
|
||||
|
||||
- **[discrete](discrete.md)**: Detecting collisions only at discrete points in time (each engine tick or "frame") -- this is easier but can result in detecting the collisions in wrong ways or missing them completely (imagine a fast flying object that in one moment is wholly in front of a wall and at the next instant wholly behind it). Nevertheless this is completely usable, one just has to be careful enough about the extreme cases.
|
||||
- **[continuous](continuous.md)**: Detecting collisions considering the continuous motion of the bodies (still done at discrete ticks but [analytically](analytical.md) considering the whole motion since the last tick) -- this is more difficult to program and more costly to compute, but also correctly detects collisions even in extreme cases. Sometimes engines perform discrete detection by default and use continuous detection in special cases (e.g. when speeds become very high or in other error-prone situations). Continuous detection can be imagined as a collision detection of a higher dimensional bodies where the added dimension is time -- e.g. detecting collisions of 2D spheres becomes detecting collisions of "tubes" in 3D space. If you don't want to go all the way to implementing continuous collisions, you may consider an in-between solution by detecting collisions in smaller steps (which may also be done only sometimes, e.g. only for high speed bodies or only when an actual discrete collision is detected).
|
||||
- **[discrete](discrete.md)**: Detecting collisions only at one point in time (each engine tick or "frame") -- this is easier but can result in detecting the collisions in wrong ways or missing them completely (imagine a fast flying object that in one moment is wholly in front of a wall and at the next instant wholly behind it). Nevertheless this is completely usable, one just has to be careful enough about the extreme cases.
|
||||
- **[continuous](continuous.md)**: Detecting collisions considering the continuous motion of the bodies (still done at discrete ticks but considering the whole motion since the last tick) -- this is more difficult to program and more costly to compute, but also correctly detects collisions even in extreme cases. Sometimes engines perform discrete detection by default and use continuous detection in special cases (e.g. when speeds become very high or in other error-prone situations). Continuous detection can be imagined as a collision detection of a higher dimensional bodies where the added dimension is time -- e.g. detecting collisions of 2D spheres becomes detecting collisions of "tubes" in 3D space. If you don't want to go all the way to implementing continuous collisions, you may consider an in-between solution by detecting collisions in smaller steps (which may also be done only sometimes, e.g. only for high speed bodies or only when an actual discrete collision is detected).
|
||||
|
||||
Collision detection is non-trivial because we need to detect not only the presence of the collision but also its parameters which are typically the exact **point of collision, collision depth and collision [normal](normal.md)** -- these are needed for subsequently resolving the collision (typically the bodies will be shifted along the normal by the collision depth to become separated and [impulses](impulse.md) will be applied at the collision point to update their velocities). We also need to detect **general cases**, i.e. collisions of whole volumes (imagine e.g. a tiny cuboid inside an arbitrarily rotated bigger cone). This is very hard and/or expensive for some complex shapes such as general 3D triangle meshes (which is why we approximate them with simpler shapes). We also want the detection algorithm to be at least reasonably **fast** -- for this reason collision detection mostly happens in two phases:
|
||||
|
||||
- **broad phase**: Quickly estimates which bodies MAY collide, usually with [bounding volumes](bounding_volume.md) (such as spheres or [axis aligned bounding boxes](aabb.md)) or space indexing and algorithms such as *[sweep and prune](sweep_and_prune.md)*. This phase quickly opts-out of checking collision of objects that definitely CANNOT collide because they're e.g. too far away.
|
||||
- **narrow phase**: Applying the precise, expensive collision detection on the potentially colliding pairs of bodies determined in the broad phase. This yields the real collisions.
|
||||
|
||||
In many cases it is also important to correctly detect the **order of collisions** -- it may well happen a body collides not with one but with multiple bodies at the time of collision detection and the computed behavior may vary widely depending on the order in which we consider them. Imagine that body *A* is colliding with body *B* and body *C* at the same time; in [real life](real_life.md) *A* may have first collided with *B* and be deflected so that it never hits *C*, or the other way around, or it might have collided with both. In continuous collision detection we know the order as we also have exact time coordinate of each collision (even though the detection itself is still computed at discrete time steps), i.e. we know which one happened first. With discrete collisions we may use [heuristics](heuristic.md) such as the direction in which the bodies are moving, but this may fail in certain cases (considering e.g. rotations).
|
||||
In many cases it is also important to correctly detect the **order of collisions** -- it may well happen a body collides not with one but with multiple bodies at the time of collision detection and the computed behavior may vary widely depending on the order in which we consider them. Imagine that body *A* is colliding with body *B* and body *C* at the same time; in [real life](real_life.md) *A* may have first collided with *B* and be deflected so that it would have never hit *C*, or the other way around, or it might have collided with both. In continuous collision detection we know the order as we also have exact time coordinate of each collision (even though the detection itself is still computed at discrete time steps), i.e. we know which one happened first. With discrete collisions we may use [heuristics](heuristic.md) such as the direction in which the bodies are moving, but this may fail in certain cases (consider e.g. collisions due to rotations).
|
||||
|
||||
**On shapes**: general rule is that **mathematically simpler shapes are better for collision detection**. Spheres (or circles in 2D) are the best, they are stupidly simple -- a collision of two spheres is simply decided by their [distance](distance.md) (i.e. whether the distance of their center points is less that the sum of the radia of the spheres), which also determines the collision depth, and the collision normal is always aligned with the vector pointing from one sphere center to the other. So **if you can, use spheres** -- it is even worth using multiple spheres to approximate more complex shapes if possible. [Capsules](capsule.md) ("extruded spheres"), infinite planes, half-planes, infinite cylinders (distance from a line) and axis-aligned boxes are also pretty simple. Cylinders and cuboids with arbitrary rotation are bit harder. Triangle meshes (the shape most commonly used for real-time 3D models) are very difficult but may be [approximated](approximation.md) e.g. by a [convex hull](convex_hull.md) which is manageable (a convex hull is an intersection of a number of half-spaces) -- if we really want to precisely collide full 3D meshes, we may split each one into several convex hulls (but we need to write the non-trivial splitting algorithm of course). Also note that you need to write a detection algorithm for any possible pair of shape types you want to support, so for *N* supported shapes you'll need *N * (N + 1) / 2* detection algorithms.
|
||||
|
||||
{ In theory we may in some cases also think about using iterative/numerical methods to find collisions, i.e. starting at some point between the bodies and somehow stepping towards their intersection until we're close enough. Another ideas I had was to use [signed distance functions](sdf.md) for representing static environments, it could have some nice advantages. But I'm really not sure how well or whether it would really work. ~drummyfish }
|
||||
{ In theory we may in some cases also think about using iterative/numerical methods to find collisions, i.e. starting at some point between the bodies and somehow stepping towards their intersection until we're close enough. Another idea I had was to use [signed distance functions](sdf.md) for representing static environments, I kind of implemented it in [tinyphysicsengine](tinyphysicsengine.md). ~drummyfish }
|
||||
|
||||
TODO: some actual algorithms
|
@ -0,0 +1,5 @@
|
||||
# Hexadecimal
|
||||
|
||||
TODO
|
||||
|
||||
Some hexadecimal values that are also [English](english.md) words at the same time and which you may include in your programs for [fun](fun.md) include: `ace`, `add`, `babe`, `bad`, `be`, `bee`, `beef`, `cab`, `cafe`, `dad`, `dead`, `deaf`, `decade`, `facade`, `face`, `fee`, `feed`.
|
@ -1,19 +1,19 @@
|
||||
# YouTube
|
||||
|
||||
YouTube (also JewTube) is a huge, [censored](censorship.md) [proprietary](proprietary.md) [capitalist](capitalism.md) video [consumerism](consumerism.md) website, since 2006 seized by the [Google](google.md) terrorist organization. It has become the monopoly "video content platform", everyone uploads their videos there and so everyone is forced to use that shitty site from time to time to view some tutorial or whatnot. YouTube is based on content consumerism, [copyright trolling](copyright_troll.md), propaganda and abuse of users -- it is financed from surveillance of its users and aggressive ads as well as sponsored content inserted into videos. Alternatives to YouTube, such as [bitchute](bitchute.md), the "rightist" YouTube, never really caught on very much -- YouTube is sadly synonymous with online videos just as Google is synonymous with searching the web.
|
||||
YouTube (also JewTube) is a huge, [censored](censorship.md) [proprietary](proprietary.md) [capitalist](capitalism.md) video [consuming](consumerism.md) "website"/platform, since 2006 seized by the [Google](google.md) terrorist organization. It has become the monopoly "video content platform", everyone uploads his videos there and so everyone is forced to use that shitty site from time to time to view some tutorial or whatnot. YouTube is based on content consumerism, aggressive predatory marketing, [copyright trolling](copyright_troll.md), propaganda and general abuse of its [useds](used.md) -- it is financed from surveillance-powered ads as well as sponsor propaganda inserted into videos. Alternatives to YouTube, such as [bitchute](bitchute.md), the "rightist" YouTube, never really caught on very much -- YouTube is sadly synonymous with online videos just as Google is synonymous with searching the web. This is of course extremely, extremely, extremely, extremely bad.
|
||||
|
||||
{ https://www.vidlii.com seems alright though, at least as a curiosity. ~drummyfish }
|
||||
{ https://www.vidlii.com seems alright though, at least as a curiosity. Anyway if you need to watch YouTube, do not use their website, it's shitty as hell and you will die of ad cancer, rather use something like invidious or youtube-dl. ~drummyfish }
|
||||
|
||||
A [FOSS](foss.md) alternative to YouTube is e.g. [PeerTube](peertube.md), a federated video platform, however for intended use it requres [JavaScript](javascript.md). There also exist alternative YouTube [frontends](frontend.md) (normally also FOSS), e.g. HookTube, Invidious or FreeTube -- these let you access YouTube's videos via less [bloated](bloat.md) and more privacy-friendly interface. More hardcore people use [CLI](cli.md) tools such as [youtube-dl](youtube_dl.md) to directy download the videos and watch them in native players.
|
||||
A [FOSS](foss.md) alternative to YouTube is e.g. [PeerTube](peertube.md), a federated video platform, however for intended use it requres [JavaScript](javascript.md) and there are other issues that make it unusable ([SJW](sjw.md) censorship, videos load extremely slowly, ...). There also exist alternative YouTube [frontends](frontend.md) (normally also [FOSS](foss.md)), e.g. HookTube, Invidious or FreeTube -- these let you access YouTube's videos via less [bloated](bloat.md) and more privacy-friendly interface. More hardcore people use [CLI](cli.md) tools such as [youtube-dl](youtube_dl.md) to directy download the videos and watch them in native players.
|
||||
|
||||
In November 2021 YouTube removed the dislike count on videos so as to make it impossible to express dislike or disagreement with their propaganda as people naturally started to dislike the exponentially skyrocketing shit and immorality of content [corporations](corporation.md) and [SJWs](sjw.md) started to force promote on YouTube (such as that infamous Lord of the Rings series with ["afro american"](nigger.md) dwarves that got like a billion dislikes [lmao](lmao.md)). In other words capitalism has made it to the stage of banning disliking when people started to dislike the horse shit they're being force fed. This was met with a wave of universal criticism but of course YouTube told people to shut up and keep consuming that horse excrement -- of course [zoomers](zoomer.md) are just brainless zombies dependent on YouTube like a street whore on heroin so they just accepted that recommendation. Orwell would definitely be happy to see this.
|
||||
In November 2021 YouTube removed the dislike count on videos so as to make it impossible to express dislike or disagreement with their propaganda as people naturally started to dislike the exponentially skyrocketing shit and immorality of content [corporations](corporation.md) and [SJWs](sjw.md) started to force promote on YouTube (such as that infamous Lord of the Rings series with ["afro american"](nigger.md) dwarves that got like a billion dislikes [lmao](lmao.md)). In other words capitalism has made it to the stage of banning disagreement when people started to dislike the horse shit they're being force fed. This was met with a wave of universal criticism but of course YouTube told people to shut up and keep consuming that horse excrement -- of course [zoomers](zoomer.md) are just brainless zombies dependent on YouTube like a street whore on heroin so they just accepted that recommendation. Orwell would definitely be happy to see this.
|
||||
|
||||
[LMAO](lmao.md), as of 2022 YouTube has become the **kingdom of [clickbait](clickbait.md)**. If you're living in the future and haven't seen this, you wouldn't believe how ridiculously fucked up it is, the platform is quite literally UNUSABLE (but it's still consumable and addictive to idiots so it [works](just_werks.md)) -- ALL videos, including (and especially) those of the "serious" YouTubers (like mr. Veritasium), put absolutely misleading and downright made up lying thumbnails and titles, the videos have [zero](zero.md) [correlation](correlation.md) with how they're presented. Additionally the majority of thumbnails has to be occupied by some [femoid](femoid.md)'s breasts, even "educational [science](soyence.md) videos", so as to force children to click it and masturbate (YouTube can really be seen as a soft [porn](porn.md) site now). Everyone has to do it because [everyone does it](everyone_does_it.md). In other words capitalism is once again working as expected. Yeah and also **ALL videos include sponsored content**, again even the "educational science videos" that children are forced to watch at schools etc. -- this is in addition to "normal" ads that randomly play during the videos.
|
||||
|
||||
A typical 2022 YouTube video now looks like this:
|
||||
|
||||
- title: THEY SAID I COULDN'T CODE MINECRAFT IN 24 MICROSECONDS SO I DID, ALSO WE FOUND ALIEN LIFE
|
||||
- thumbnail: [MILF](milf.md) in bikini with nipples half showing and overly excited face as if having a stroke, pointing at aliens playing Minecraft
|
||||
- content: 10 minutes of pre-video unskippable ads, a tranny shows up urging you to buy premium membership on Nord VPN, 10 minutes of unskippable ads for tranny underwear, tranny opens an [IDE](ide.md) that loads for 30 minutes, clicks the "generate game with AI" button, the computer crashes, 10 minutes of post video ads, "like, comment, subscribe, click the bell button, go to settings and check I want to see subscriptions I subscribe to, go to advanced setting and click I really really really want to see my subscriptions I really do", next video loads without asking
|
||||
- title: THEY SAID A WOMAN COULDN'T CODE MINECRAFT IN 24 MICROSECONDS SO I PROVED THEM WRONG, ALSO ALIEN LIFE FOUND
|
||||
- thumbnail: bikini [MILF](milf.md), nipples half showing, overly excited face as if having a stroke, pointing at aliens playing Minecraft
|
||||
- content: 10 minutes of pre-video unskippable ads, tranny shows up urging you to buy premium membership on Nord VPN, 10 minutes of unskippable ads for tranny underwear, tranny opens an [IDE](ide.md) that loads for 30 minutes, clicks the "generate game with AI" button, the computer crashes, "sorry for clickbait", 10 minutes of post video ads, "like, comment, give me money on patreon, subscribe, click the bell button, go to settings and check I want to see subscriptions I subscribe to, go to advanced setting and click "I really really really want to see my subscriptions I really do and will suck your dick", next video loads without asking, volume sets itself to 100%, browser close button disappears
|
||||
|
||||
YouTube is also a [copyright](copyright.md) [dictatorship](dictatorship.md), anyone can take down any video containing even the slightest clip from a video he uploaded, even if such use would legally be allowed under [fair use](fair_use.md) and even if that user doesn't have any copyright to enforce (YouTube simply supposes that whoever uploads a video to their site first must have created that video as a whole and holds a godlike power over it), i.e. YouTube is [de facto](de_facto.md) making its own copyright laws which are much more strict that they are in real life (which is hard to imagine but they managed to do it). In other words there is a corporation that makes laws which effectively are basically just like normal laws except they don't even pass any law making process, their evaluation doesn't pass through justice system (courts), and the sole purpose of these laws is to rape people for money that goes solely to pay for YouTube CEO's whores and private jets. A reader in the future probably won't believe it, but there are even people who say that "this is OK" because, quote, I shit you not, """[they're a private company so they can do whatever they want](private_company_cant_do_whatever_it_wants.md)""". Yes, such arguments have come out of some lifeform's mouth. That probably implies a negative [IQ](iq.md).
|
Loading…
Reference in New Issue