Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draw] qcurv doesn't work, at all #3789

Closed
hiiamboris opened this issue Feb 21, 2019 · 1 comment
Closed

[Draw] qcurv doesn't work, at all #3789

hiiamboris opened this issue Feb 21, 2019 · 1 comment
Assignees
Labels
status.built A change in codebase has been done to address the ticket. type.bug Ticket describes an abnormal behavior, not conforming to the specs or expectation.

Comments

@hiiamboris
Copy link
Collaborator

Describe the bug

What do the docs say:

So, essentially, qcurv, in contrast to other shape curve functions, can only accept one point (1).
Let's try it in 3 different ways...

view [
	base 250x250 draw [		; feeding a single point
		scale 10 10 pen linear cyan purple 
		shape [move 5x5 qcurv 20x5 qcurv 20x20 qcurv 5x20 qcurv 5x5 move 5x5]
	] 
	base 250x250 draw [		; feeding pairs of points
		scale 10 10 pen linear cyan purple 
		shape [move 5x5 qcurv 20x5 20x20 qcurv 5x20 5x5 move 5x5]
	] 
	base 250x250 draw [		; feeding a bunch
		scale 10 10 pen linear cyan purple 
		shape [move 5x5 qcurv 20x5 20x20 5x20 5x5 move 5x5]
	] 
]


Some nice smoothing (2) ☻

Expected behavior

(1) bug in the docs - should accept multiple points
(2) behavior of R2 is desired - here's the R2 script version and the R2 result:

view layout [
	across
	box 250x250 effect [draw [
		scale 10 10 pen red
		shape [move 5x5 qcurv 20x5 qcurv 20x20 qcurv 5x20 qcurv 5x5 move 5x5]
	]]
	box 250x250 effect [draw [
		scale 10 10 pen red
		shape [move 5x5 qcurv 20x5 20x20 qcurv 5x20 5x5 move 5x5]
	]]
	box 250x250 effect [draw [
		scale 10 10 pen red
		shape [move 5x5 qcurv 20x5 20x20 5x20 5x5 move 5x5]
	]]
]

Platform version (please complete the following information)

Red 0.6.4 for Windows built 30-Jan-2019/9:03:13+03:00 commit #25ef631
@hiiamboris
Copy link
Collaborator Author

hiiamboris commented Feb 21, 2019

There actually is one scenario where it does work, albeit only once. After qcurve.

view [
	base 250x250 draw [
		scale 10 10 pen linear cyan purple 
		shape [move 5x5 qcurve 20x5 20x20 qcurv 5x20 qcurv 5x5]
	] 
	base 250x250 draw [
		scale 10 10 pen linear cyan purple 
		shape [move 5x5 qcurve 20x5 20x20 qcurv 5x20 5x5]
	] 
]

While the same code in R2 - qcurv can continue the curve indefinitely:

view layout [
	across
	box 250x250 effect [draw [
		scale 10 10 pen red
		shape [move 5x5 qcurve 20x5 20x20 qcurv 5x20 5x5]
	]]
	box 250x250 effect [draw [
		scale 10 10 pen red
		shape [move 5x5 qcurve 20x5 20x20 qcurv 5x20 qcurv 5x5]
	]]
]

@qtxie qtxie added status.built A change in codebase has been done to address the ticket. type.bug Ticket describes an abnormal behavior, not conforming to the specs or expectation. labels Mar 14, 2019
@qtxie qtxie closed this as completed Mar 21, 2019
greggirwin pushed a commit to greggirwin/red that referenced this issue May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status.built A change in codebase has been done to address the ticket. type.bug Ticket describes an abnormal behavior, not conforming to the specs or expectation.
Projects
None yet
Development

No branches or pull requests

2 participants