Post AqbRc4NzccuiGPERIO by soc@chaos.social
(DIR) More posts by soc@chaos.social
(DIR) Post #AqbQHRM4vcNxSvw4Yq by foone@digipres.club
2025-01-30T08:50:21Z
0 likes, 0 repeats
preferred rectangle data model:
(DIR) Post #AqbQT7PetnRB5hB9eq by larsmb@mastodon.online
2025-01-30T08:52:28Z
0 likes, 0 repeats
@foone only one of them allows for the described rectangle to not be a rectangle, clearly that one is much more fun
(DIR) Post #AqbR24Y5XUm2LMmz9U by krans@mastodon.me.uk
2025-01-30T08:58:23Z
0 likes, 0 repeats
@foone ((left bottom) (right top))
(DIR) Post #AqbR65zK87VjxwRkfo by allo@chaos.social
2025-01-30T08:59:28Z
0 likes, 0 repeats
@foone Depends very much on the use-case.
(DIR) Post #AqbR9KZkLnTy4p1fDE by bikubi@mastodon.social
2025-01-30T08:59:21Z
0 likes, 0 repeats
@foone top right bottom left, css damaged me, still do a little poem every time and a hand motion as if it were magnetic forces
(DIR) Post #AqbRc4NzccuiGPERIO by soc@chaos.social
2025-01-30T09:05:12Z
0 likes, 0 repeats
@foone Can we mix and match? 👉👈
(DIR) Post #AqbS1Qm7W6GgwSbu9Q by lritter@mastodon.gamedev.place
2025-01-30T09:09:49Z
0 likes, 0 repeats
@foone B because it's an interval
(DIR) Post #AqbSB3KnWW8j8bQ0wq by doriane@post.lurk.org
2025-01-30T09:11:29Z
0 likes, 0 repeats
@foone depends what im doing! as a declarative css lover through the box model im used to put rectangle inside other rectangle and using margin and padding to do so, which is c the second option relatively to its parent, but if im breaking out of the nested flow with position absolute I think i'd use the first one, as it becomes its own parentless sticker to stick on top of everything.
(DIR) Post #AqbUy65sFkBbnFx5kG by criffer@mastodon.social
2025-01-30T09:42:53Z
0 likes, 0 repeats
@foone I have classes representing both and freely convert between them. The former is easier for transformations and the latter easier for union/intersections.Both are represented by a pair of vectors. RelativeRectangle containsVector origin;Vector size;while AbsoluteRectangle containsVector top_left;Vector bottom_right;The coercion operators simply add or subtract the second Vector from the first.
(DIR) Post #AqbaNCeHWCRd8Lpvo8 by foone@digipres.club
2025-01-30T10:43:24Z
0 likes, 0 repeats
@MrDOS Nope! it seems to use left,top,right,bottom but it was Carmen Sandiego that reminded me of this question
(DIR) Post #AqbgoPI5DuIbsyoC0W by drj@typo.social
2025-01-30T11:55:33Z
0 likes, 0 repeats
@foone actually, two points, either diagonal pair, which is sort of your bottom option, when normalised, in a suitable coordinate system.
(DIR) Post #Aqbh8FQRbxpd56BEo4 by me@mastodon.seahousen.eu
2025-01-30T11:58:41Z
0 likes, 0 repeats
@foone enforcing x, h, w, h ≥ 0 via type system is way easier than enforcing x0, y0 ≥ 0, x1 ≥ x0, y1 ≥ y0
(DIR) Post #Aqbhq8LZI5hZrvpGTY by lpwaterhouse@ioc.exchange
2025-01-30T12:07:03Z
0 likes, 0 repeats
@foone x1,y1,x2,y2 ;-)
(DIR) Post #AqbjuUjqBJccNiO19k by Peewi@idlethumbs.social
2025-01-30T12:30:13Z
0 likes, 0 repeats
@foone x,y,w,h, but also with properties for left,top,right,bottom
(DIR) Post #AqblnQTtoKh33kgerQ by pyromuffin@mastodon.gamedev.place
2025-01-30T12:51:23Z
0 likes, 0 repeats
@foone x, y, w/2, h/2 for me. you’re going to need those numbers anyway for bounds testing. is it weird that i think of them like quad radii?
(DIR) Post #Aqbqwm3xRKkwN2pWM4 by dijumx@mstdn.social
2025-01-30T13:49:07Z
0 likes, 0 repeats
@foone Depends what it's being used for. T,L,B,R is useful for direct comparisons with the bounding box (assuming world-space).Also, does the (x,y) in x,y,w,h refer to the centre of the rectangle, or one of the corners?
(DIR) Post #AqbuKvTIPTd0MbtEEC by Moosader@mastodon.gamedev.place
2025-01-30T14:26:38Z
0 likes, 0 repeats
@foone for gamedev I prefer x,y,w,h because then I can use a Rect for Position/Dimensions without doing extra math for dimensions or having to store a second variable.
(DIR) Post #AqbvQJML7gYfqulfRA by twipped@twipped.social
2025-01-30T14:39:15Z
0 likes, 0 repeats
@foone depends on what we’re plotting. @catsalad
(DIR) Post #AqcIMxBRPh779W2QEa by icodestuff@infosec.exchange
2025-01-30T18:56:14Z
0 likes, 0 repeats
@foone origin.x, origin.y, size.width, size.height
(DIR) Post #AqcTEiRPRNfkbnmWAa by dec_hl@mastodon.social
2025-01-30T20:58:00Z
0 likes, 0 repeats
@foone #p5js with rectMode()https://p5js.org/reference/p5/rectMode/
(DIR) Post #AqccI29fV6DkCr8lFI by foone@digipres.club
2025-01-30T22:39:36Z
0 likes, 0 repeats
@dec_hl RADIUS? for rectangles? oh dear
(DIR) Post #AqccnCtBdoakTVIOQK by indigoparadox@mastodon.social
2025-01-30T22:45:12Z
0 likes, 0 repeats
@foone @dec_hl I'm glad I'm not the only one who insists parallelograms have a radius.
(DIR) Post #Aqce6SPcFcQg4iCumW by foone@digipres.club
2025-01-30T22:59:48Z
0 likes, 0 repeats
@indigoparadox @dec_hl rectangles have a radius much like babies have a caloric value.technically, yes, but you should be deeply suspicious of why anyone would bring it up
(DIR) Post #Aqdt9MTsS7gH1E0Gqe by stib@aus.social
2025-01-31T13:23:07Z
0 likes, 0 repeats
@fooneCursed form: Ï´, r - where theta is the angle between the x axis and a line from the centre to the top right corner and r is the distance from the centre to the corners. Only requires two values to define the rectangle, at the expense of having to do trig to get the actual size of the rectangle.
(DIR) Post #Aqed0XDtjubjcXG4p6 by leeloo@techhub.social
2025-01-31T21:57:01Z
0 likes, 0 repeats
@foonex,y,w,h allows moving the rectangle arbitrarily without any risk of cumulative rounding errors.