If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Constrained Rectangle
Constrained Rectangle
Hi All
I'm hoping i may be able to get some help with an exe i'm trying to create. I'm trying to create a rectangle within a space that changes raito but is constrained within the space of a second rectangle. It's mainly to workout a projection canvas and then drop 16:9 projectors 'Rectangles' over the canvas.
I thought this would be easy but i can't seem to crack it, It's probably something very simple but i just can't see the solution.
Any help would be much appreciated.
I'm hoping i may be able to get some help with an exe i'm trying to create. I'm trying to create a rectangle within a space that changes raito but is constrained within the space of a second rectangle. It's mainly to workout a projection canvas and then drop 16:9 projectors 'Rectangles' over the canvas.
I thought this would be easy but i can't seem to crack it, It's probably something very simple but i just can't see the solution.
Any help would be much appreciated.
- Attachments
-
- calc 2.fsm
- (524.45 KiB) Downloaded 908 times
- martinvicanek
- Posts: 1334
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Constrained Rectangle
I was not sure from your schematic what your goal is so I'll try to answer your question.
Suppose you have a rectangle with sides a and b, and you want to fit it into another rectangle with sides A and B, while maintaining the aspect ratio a/b. Your scale factor is
scale = min(A/a,B/b)
so your new rectangle will have the dimensions
a' = scale*a
b' = scale*b
Does that answer your question?
Suppose you have a rectangle with sides a and b, and you want to fit it into another rectangle with sides A and B, while maintaining the aspect ratio a/b. Your scale factor is
scale = min(A/a,B/b)
so your new rectangle will have the dimensions
a' = scale*a
b' = scale*b
Does that answer your question?
Re: Constrained Rectangle
Thanks for pointing me in the right direction. It most definitley helps.
I'm just creating a projection calculator to help me setting up projection on shows. I know there's a few out there already but i just wanted to see if i could do my own.
I really appreciate the fast response thank you. Matt
I'm just creating a projection calculator to help me setting up projection on shows. I know there's a few out there already but i just wanted to see if i could do my own.
I really appreciate the fast response thank you. Matt
- martinvicanek
- Posts: 1334
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Constrained Rectangle
Here is an example.
- Attachments
-
- FitImageIntoCanvas.fsm
- (783.71 KiB) Downloaded 923 times
Re: Constrained Rectangle
Hi Martin
Thank you very much for the example.
It really helps me understand. Sorry for being a bit slow.
Thank you very much for the example.
It really helps me understand. Sorry for being a bit slow.
Re: Constrained Rectangle
thanks Martin, however, where is the rest of the image? lol
- martinvicanek
- Posts: 1334
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Constrained Rectangle
http://www.lenna.org/full/len_full.html
Warning: may contain nudity!
Warning: may contain nudity!
Re: Constrained Rectangle
martinvicanek wrote:http://www.lenna.org/full/len_full.html
Warning: may contain nudity!
Thanks, she is nice, but I was just playing around. Teasing us with the half image.
Re: Constrained Rectangle
You do know that as moderators we really ought to delete porn.
But this is art, right?
Nice proper real and valid art.
And not porn, right?
Cheers
Spogg
But this is art, right?
Nice proper real and valid art.
And not porn, right?
Cheers
Spogg
- martinvicanek
- Posts: 1334
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Constrained Rectangle
No, not porn. Art.
I would never post porn.
I would never post porn.