Geomet...e::Arc(3pm)
π Geometry::Primitive::Arc π
okay bestie, so this is a page from the User Contributed Perl Documentation set, and it's all about Geometry::Primitive::Arc β yes the name got squished to Geomet...e::Arc up in the header because terminals are dramatic like that, but it's the same thing, promise π«Ά
β¨ NAME β¨
Geometry::Primitive::Arc β literally just a portion of the circumference of a Circle. that's it. that's the whole vibe. a little slice of the curve π
πΈ DESCRIPTION πΈ
so Geometry::Primitive::Arc represents a closed segment of a curve. it's giving "arc" in the math sense, not in the "story arc" sense, but honestly both are iconic π
π¦ SYNOPSIS π¦
here's how you'd actually use it, no cap:
use Geometry::Primitive::Arc;
my $arc = Geometry::Primitive::Arc->new(
angle_start => 0,
angle_end => 1.57079633,
radius => 15
);
look at that. angles in radians, a radius, boom. you have an arc β¨
π ATTRIBUTES π
angle_start
the starting angle for this arc, in radians. this is where your arc wakes up in the morning π
angle_end
the ending angle for this arc, also in radians. this is where it goes to bed π΄
radius
returns the radius of the arc. the bigger the radius, the bigger the drama π«
origin
set/get the origin of this arc. it's the anchor, the home base, the main character of the coordinate system π
π₯ METHODS π₯
new
creates a new Geometry::Primitive::Arc. fresh arc, fresh start, obsessed π
get_point_at_angle
give it an angle in radians and it hands back the point at that angle on this arc. but heads up β it returns undef if that angle falls outside this arc's range. so no, you can't just ask for any angle you want, bestie, respect the boundaries π
length
returns the length of this arc. how long is the curve? this tells you π«
point_end
get the end point. provided for the Shape role, so don't come for it π«Ά
point_start
get the start point. also provided for the Shape role. they're a matching set, it's giving coordinated π
scale ($amount)
increases the radius by multiplying it by the supplied $amount. so if you want it bigger, pass a bigger number. math is math β¨
π AUTHOR π
Cory Watson <gphat@cpan.org> β thank you for your service, legend π
π COPYRIGHT & LICENSE π
you can redistribute and/or modify this code under the same terms as Perl itself. periodt.
and that's the whole page, bestie π it came from perl v5.36.0 and it's dated 2022-12-12 β so yeah, this lore is from the before-times, but it still slays. go make some arcs, you've got this π¦β¨π
π¦ where this page comes from
- debian bookworm: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms