Beta
Computational Geometry #1: Mixing Paints
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
The kata needs to specify
len(paints)
, because this is relevant to the runtime complexity of the solutions too.Per the description:
Reraising issue from below:
Bump.
Here you go
This is exactly my point though. Why not provide a few more sample tests that are more complex than the current sample tests? Then users can get tests that describe the failure, without requiring the webpage to freeze for 45 seconds every time? Just saying "if your solution is correct then it works" does not mean there is no problem. (Is there really such a need to run over 5000 tests and to output results for each one?)
Also please do not close issues without resolving anything.
Desired paint mixture is (0.0, 0.0), but the given ratios, {((0.4553, 0.0202), 0), ((0.618, 0.0734), 0.0), ((0.2345, 0.4286), -0.0), ((0.6506, 0.7601), 0), ((0.9636, 0.1713), 0), ((0.1642, 0.0801), 0), ((0.4372, 0.3254), 0), ((0.7579, 0.7544), 0), ((0.0951, 0.6714), 0), ((0.4268, 0.8019), 0)}, resolve to (0.0, 0.0), with a total fractional value of 0.0.
Is there something "fractional value" that I've to consider? Because my color mixture actually resolves to the desired mixture.
If I gave you green and red paint, you couldn't create black paint through the absence of green paint, by just adding 0 green paint. Any ratio of my green and red paint, be it 0.1:0.9, or 0.5:0.5, or any other mixture, must have a total content that adds up to 1.0 total paint fractions
In other words, you are currently trying 5o create (0,0), i.e. black paint, by denying the existence of the paints you have on hand, like (0.6506, 0.7601). If you put 0 of every paint into a pot, you dont have black paint, you have air.
This comment has been hidden.
.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Resolved.
aight, fixed in the description too