openframeworks / openframeworks/openFrameworks
ofPolyline - extra point added when using addVertex and bezierTo
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
when creating a bezier curve,
bezierTo() function requires that at least one point is added to ofPolyline before it can be used.
so to kick things off, i add my first point
polyline.addVertex(0, 0);
i then add my bezier curve,
polyline.bezierTo(cx1, cy1, cx2, cy2, px2, py2);
when inspecting the resulting ofPolyline im seeing the first two points as identical - both (0, 0)
the second point is a duplicate.
so the first bezier point should be ignored as it has already been added as a vertex.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using ofPolyline with addVertex(0, 0) followed by bezierTo(cx1, cy1, cx2, cy2, px2, py2), then inspect the resulting points. Start with the addVertex and bezierTo entry points; done means the initial point is not duplicated in the resulting polyline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100