A list of puns related to "Barycentre"
Google translator says "the Center of Gravity", turns out that it not what i'm looking for
I am trying to see if a point is within a triangle in which it's 3 points are in cartesian space. I used bresenham to outline the coordinates for you, all of that area should be filled with white pixels and that area only. I am using tinyrenderer https://github.com/ssloy/tinyrenderer/wiki/Lesson-2:-Triangle-rasterization-and-back-face-culling as a guideline. I converted his stuff from his setup to mine.
void computeTriangle(Vec2i a, Vec2i b, Vec2i c, TGAImage &image, TGAColor color) {
//find bounding box dimensions
int maxX = a.x;
int maxY = a.y;
int minX = a.x;
int minY = a.y;
//max coordinate
if (maxX <= b.x) {
maxX = b.x;
}
if (maxX <= c.x) {
maxX = c.x;
}
if (maxY <= b.y) {
maxY = b.y;
}
if (maxY <= c.y) {
maxY = c.y;
}
//min coordinate
if (minX >= b.x) {
minX = b.x;
}
if (minX >= c.x) {
minX = c.x;
}
if (minY >= b.y) {
minY = b.y;
}
if (minY >= c.y) {
minY = c.y;
}
minX--;
minY--;
maxX++;
maxY++;
//bound loop
for (int pX=minX; pX<=maxX; pX++) {
for (int pY=minY; pY<=maxY; pY++) {
Vec3f u = cross(Vec3f(c.x - a.x, b.x - a.x, a.x - pX), Vec3f(c.y - a.y, b.y - a.y, a.y - pY));
Vec3f bcScreen;
if (std::abs(u.z)<1) {
bcScreen = Vec3f(-1,1,1);
} else {
bcScreen = Vec3f(1.f-(u.x+u.y)/u.z, u.y/u.z, u.x/u.z);
}
if (bcScreen.x<0 || bcScreen.y<0 || bcScreen.z<0) {
image.set(pX, pY,color);
}
}
}
}
Only just found out about this group.
I'm working on a project called 'Outpost Engineer'. All my 3d assets are voxel based hence I thought It might be interesting to post about it here.
I'm using marching cubes to render the chunk based terrain and all 3d assets.
I created a custom triplanar shader that takes in a texture 2darray and uses barycentric coordinates to blend voxels at the edges. That way I don't need to specify uv coordinates and can still render textures. Created it with shader graph / unity. You can see the terrain and some more in action here: https://www.youtube.com/watch?v=vd_oe_Zc46k&feature=emb_logo
Interacting with terrain (digging, building) that is less blocky caused some challenges (the place a raycast hits isn't always the exact voxel you want) but I think I got it covered now by doing a sort and proximity check for full voxels afterwards.
My 3d models are first created in MagickaVoxel, and then transformed into smoother meshes using marching cubes. They aren't photo-realistic high detail meshes but that isn't the style I am going for anyway. Example: https://twitter.com/david_decraene/status/1311338925617750018/photo/1
Some external links:
About three weeks ago I wrote a post showcasing my custom shader for marching cubes models. (cfr https://www.reddit.com/r/VoxelGameDev/comments/jdbgnj/using_marching_cubes_triplanar_shader_and/)
I finally got some time and wrote a technical blogpost on how I actually use those barycentric coordinates in my shader to blend voxel textures in a marching cubes mesh.
You can read about it here:
Barycentric Coordinates are a sort of weighted average of the points of a triangle (it has a much more general intuition but this will do).
I'll try to elucidate why I think these are so cool but here on Brilliant.org is a more in depth introduction.
Barycentric Coordinates are based around the physical concept of center of mass. By default, the center of mass or centroid of a triangle is at the intersection of its medians (lines from veritices that bisect opposite sides). However, by changing the "masses" of the three vertices the position of the centre of mass can be altered. Moreover, with the right combination of three masses for the three verticies, we can represent any point within the triangle, a coordinate system!.
To illustrate some of the properties of these coordinates and and their utility, I'll try to sketch a quick proof that the medians of a triangle cut one another in the ratio of 2 to 1.
In the diagram above we see the point O (1,1,1) which is the center of mass of A, B and C. However, we can alternatively reach the center of mass of the triangle by first finding the center of mass of B and C which we'll call D (the midpoint of BC since they have the same mass themselves) and then find the center of mass of D and A.
Since D is the center of mass of B and C it has the sum of their masses: 2. Hence the center of mass of A and D will lie twice as close to D as A since D is twice as heavy as A. Consequently AO = 2DO.
(end of proof)
Furthermore, most all of the special points in a triangle have interesting barymetric interpretations. If ABC has sides a, b and c:
Image from http://mathworld.wolfram.com/BarycentricCoordinates.html
Finally, it is worth noting that the coordinates are homogenous, that is, (x,y,z) = (kx,ky,kz) for non-zero k.
Hope you enjoyed!
I don't want to step on anybody's toes here, but the amount of non-dad jokes here in this subreddit really annoys me. First of all, dad jokes CAN be NSFW, it clearly says so in the sub rules. Secondly, it doesn't automatically make it a dad joke if it's from a conversation between you and your child. Most importantly, the jokes that your CHILDREN tell YOU are not dad jokes. The point of a dad joke is that it's so cheesy only a dad who's trying to be funny would make such a joke. That's it. They are stupid plays on words, lame puns and so on. There has to be a clever pun or wordplay for it to be considered a dad joke.
Again, to all the fellow dads, I apologise if I'm sounding too harsh. But I just needed to get it off my chest.
Do your worst!
I'm surprised it hasn't decade.
For context I'm a Refuse Driver (Garbage man) & today I was on food waste. After I'd tipped I was checking the wagon for any defects when I spotted a lone pea balanced on the lifts.
I said "hey look, an escaPEA"
No one near me but it didn't half make me laugh for a good hour or so!
Edit: I can't believe how much this has blown up. Thank you everyone I've had a blast reading through the replies π
It really does, I swear!
Because she wanted to see the task manager.
Hi!
I'm pretty new to UMG, so far I'm finding it very good compared to my experiences with Unity and the UGUI.
Right now I'm trying to create a slider to control three different values, something like the image below (screenshot from the character creator from The Elder Scrolls Online).
While I managed to create many different widgets, they usually are very simple (custom buttons, etc), so I don't know where to start with this.
Should I inherit from a Slate Widget? Can this be done directly with UMG?
Any help would be appreciated.
I'm using C++ and trying to avoid using Blueprints.
Theyβre on standbi
I tried googling everything I could think of, but it didnβt come up with anything relevant.
Rephrase of the question: are we chasing Polaris, or is Polaris chasing us?
Edit: okay, so the sun orbits the barycentre of the Milky Way galaxy, no problem.
Pilot on me!!
Nothing, he was gladiator.
Because I'm full of dumb ideas. Spoilers because direct reference is made to locations (and to the astrometrically astute, their characteristics).
I strongly suspect OW's astrophysics is a simplified Keplerian model, and accordingly it should be possible to derive good approximations of the orbital elements for everything in the solar system simply by observation. The Outer Wilds are in fact a relatively idealized system for the following reasons:
So I put together a spreadsheet with the Keplerian parameters and several formulae that should allow most of the parameters, and some other interesting points like planetary mass, to be derived. Bold rows require some input; others are derived.
Specific methodologies for each (in the order they could optimally be captured):
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.