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
10 posts
• Page 1 of 1
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 822 times
- willzz32
- Posts: 20
- Joined: Thu Jul 29, 2010 7:59 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?
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
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
- willzz32
- Posts: 20
- Joined: Thu Jul 29, 2010 7:59 pm
Re: Constrained Rectangle
Here is an example.
- Attachments
-
- FitImageIntoCanvas.fsm
- (783.71 KiB) Downloaded 832 times
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
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.
- willzz32
- Posts: 20
- Joined: Thu Jul 29, 2010 7:59 pm
Re: Constrained Rectangle
thanks Martin, however, where is the rest of the image? lol
-
pshannon - Posts: 144
- Joined: Fri Jan 02, 2015 3:08 am
Re: Constrained Rectangle
http://www.lenna.org/full/len_full.html
Warning: may contain nudity!
Warning: may contain nudity!
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
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.
-
pshannon - Posts: 144
- Joined: Fri Jan 02, 2015 3:08 am
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
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Constrained Rectangle
No, not porn. Art.
I would never post porn.
I would never post porn.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 59 guests