conic-toan:0.3.8 - #5749
Open
Thutran1891 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update
conic-toanto 0.3.8.Added
duong-path, a general open or closed drawing path that combinesstraight segments, circular or elliptic arcs, cubic Bézier segments, and
sampled function or parametric graphs before applying one fill and stroke.
It supports multiple subpaths via
bat-dau, tangent-aligned arrowheads atthe overall endpoints, and optional closing of every subpath.
duong-kinremains the concise always-closed compatibility wrapper. Unlike
overlapping independently filled shapes, semi-transparent fills do not
darken at internal overlaps and no artificial seams are produced.
noi-thang,noi-cung,noi-cung-elip,noi-bezier,noi-do-thi,noi-tham-so, andnoi-cuc.Ordinary points are shorthand for straight segments.
noi-do-thi(f, a, b, n: 80)supports both increasing and decreasingbounds, allowing a graph boundary to be traversed in either direction.
Functions used as path boundaries must be finite and continuous over the
sampled interval.
mui-ten-dauandmui-ten-cuoiparameters tocungandcung-elip. Each accepts an arrowhead size (for example6pt), follows theactual tangent at that endpoint (including reversed and rotated arcs), and
defaults to
none.ve-tham-sofor parametric curves andve-cucfor polar curves. Bothuse the existing drawing context, split samples outside the viewport, and
support endpoint arrowheads.
lay-mau-tham-soexposes the sampled points.ctx-affine,ctx-ti-le,ctx-nghieng, andctx-doi-xung. Reflection supports the coordinate axes,a point, or an arbitrary line through two points. Circles now follow the
full affine transform instead of transforming only their centers.
giao-duong-cong, which approximates all intersections of twoparametric curves over supplied parameter intervals.
nut-hinhandve-nut, plusnoi-nutconnectors that automatically meet rectangular, rounded,circular, or elliptic node boundaries. Compass anchors can be selected
explicitly when automatic boundary intersection is not desired.
Fixed
truc-sowith a single arrowhead at the right end, matching thepositive direction of the number line, instead of arrowheads at both ends.
brackets no longer obscure the labels.
biquadratic, and quadratic-over-linear graphs. The x-coordinate label is
placed below the axis for a positive y-value and above it for a negative
y-value; the y-coordinate label is placed to the left for a positive
x-value and to the right for a negative x-value. At extrema on the y-axis,
the y-coordinate label uses
above-leftorbelow-leftaccording to itssign. Explicit per-point label directions continue to override these
defaults.
a biquadratic graph when automatic labeling is used.
Implementation notes
curve.move,curve.line,curve.cubic, andcurve.closeprimitives and requires no externalpackage.
at most 90 degrees by default. Rotated ellipses are supported, and callers
can override the number of pieces with
chia:.ellipse, then apply rotation and the drawing-context transform. Their
direction is therefore independent of the sampling count
n.coordinate transform. The resulting curve is normalized inside one
positioned box, so
hinhautomatic viewport detection measures itcorrectly.
segment is inserted automatically. A Bézier segment requires a preceding
current point.
rejection and geometric deduplication. Increasing
nimproves accuracyfor strongly curved paths or nearby intersections.
connectors calculate boundary intersections in page coordinates so text
padding remains exact regardless of graph scale.
Validation
thu-duong-kin.typcovering a capsule made from lines and arcs, aregion bounded jointly by a parabola and a semicircle, a rotated elliptic
arc combined with a cubic Bézier segment, a reversed function-graph
boundary, automatic viewport detection, and elliptic arcs with integrated
tangent-aligned arrowheads.
thu-giong-cuc-tri.typcovering extrema on both sides of each axis,extrema lying on the y-axis with positive and negative ordinates, cubic,
biquadratic, and quadratic-over-linear graphs, and explicit direction
overrides.
thu-tikz-0.3.8.typ, a visual integration test covering open andmulti-subpath paths, endpoint arrowheads, parametric and polar plots,
composed affine transforms, parametric intersections, and automatic or
explicit node anchors/connectors.