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

The explanation of the scale example is misleading. #19

Open
soegaard opened this issue Jul 1, 2021 · 0 comments
Open

The explanation of the scale example is misleading. #19

soegaard opened this issue Jul 1, 2021 · 0 comments

Comments

@soegaard
Copy link

soegaard commented Jul 1, 2021

Issue description

The manual has a series of examples of transformations.
One of them is the scale example. It contains the following comment:

Paramenters for the scale() function are values specified
as decimal percentages. For example, the method call scale(2.0)
will increase the dimension of the shape by 200 percent.
Objects always scale from the origin.

There are a few confusing issues here:

  • If the input of scale() were percentages, the call to double the size would be scale(200).
  • The increase of dimension for the call scale(2.0) is not 200% but only 100%.
    The problems is that 2.0 is the growth factor and the growth rate is
    growth_rate = growth_factor - 1
  • The call to scale doesn't scale the size on an object - it changes how coordinates are interpreted.

The actual example is a fine illustration of the use of scale() so I am only suggesting changing the explanation.

URL(s) of affected page(s)

https://github.com/processing/processing-docs/blob/master/content/examples/Basics/Transform/Scale/Scale.pde

Proposed fix

@SableRaf SableRaf transferred this issue from processing/processing-docs Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant