-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Defining frames with percentages #239
Comments
I mean there's not much to be done about the user selecting percentages that are not integer frames (there is really no 5.5 frame, it's either 5 or 6). When it comes to syntax, you could specialize on the first argument so that An alternative could be to go even further and define your own
or maybe |
Thanks for your thoughts. Yeah the problem I have with StepRange is that you actually need to define the step which doesn't make sense for frames because it should basically only define a begin and end. The FrameRange one is a bit verbose for me. I'm actually currently thinking that it can be solved when using a macro I assume. Like Okay it doesn't work with macros this way... |
I agree with what you are thinking about with the StepRange problem @Wikunia . One thing that I was thinking about was that the user never specifies a range smaller than one. Could we maybe provide a dispatch such that, for example, |
The problem is that |
Doesn't it always create a Also, one problem with doing julia> 0.32:0.5
0.32:1.0:0.32 I'm not sure how you could change that to have it a default step of 0.01 |
Oh yeah it's always |
Yeah I don't like the idea of overriding Base, which is why I was suggesting a special type, but I can see your point about it being kinda verbose. "You can access frames in relative terms by using ranges of Floats in between 0 and 1. Care needs to be taken about specifying the step length because julia's default step length is 1. Therefore |
I'm actually thinking again about just using |
I think we might find a compromise with #338 with something like
It's not the most fun to write but might be a way to not introduce too many other frame types. |
Is your feature request related to a problem? Please explain.
Currently it's not that easy to start with creating an animation with 100 frames and scale it to one with 200 or 500 frames.
Describe the solution you'd like
One way of improving up on it even though it's not directly THE solution to the problem would be the ability to define the frames using percentages.
Something like:
Unfortunately I think that this is not really possible to define it this way based on how
%
works and how a range works.A possibility would be to do
Perc(5:10)
but this only works for integer values so finer control likePerc(5.5:9.4)
doesn't work.A way around this would be
Perc(5.5, 9.4)
but then it's quite different to what we have withRel
or the standard way.Maybe you @ric-cioffi have some other syntax ideas as you mentioned this issue during the fourier example.
The text was updated successfully, but these errors were encountered: