Bounding Box of Triangle

I am looking for a way I can calculate the bounding box of a triangle?
For example I have a set of three points and it will return the bounds even if the triangle is rotated.
I understand that their is a method that you can use built-in but I need to be able to calculate it myself for reasons of my project.
Kind Regards

Isn't the bounding rectangle always (minx, miny, maxx, maxy) for any shape?

Similar Messages

  • Edge detection between the finiteelement mesh and a bounding box

    i have an finite element mesh ,i constucuted a bounding box which passes through the mesh ,so now i want to detect the edge of the rectangle which intersects the mesh and construct a new mesh which resides in the rectangular box.how to do this.any kind of help is appreciated.
    P /------------------\ Q
    A |---- |/---|-----|----|-----|--\--| B
    |----/|----|-----|----|-----|---\-|
    |---/-|----|-----|----|-----|----\|
    |--/--|----|-----|----|-----|---- |\
    D |-/---|----|-----|----|-----|---- | \ C
    S /-------------------------------------\ R
    suppose ABCD is FEMesh, PQRS is a bounding box,consider the edge PS when it intersect with the elements in the mesh i will get the pentagon element when i want to form the new mesh which contains the elements which are inside the box.the graphical represenation is not clear if you draw on a paper you can easily understand my problem.
    now how to create a new mesh from the elements which reside inside the boxin which the left hand side of PS will be discarded and RHS of QR edge is discarded,so now mesh will have some zigzag shape i think.so please help me out how to solve this problem.

    i think the figure is not clear , so i want to
    simplify the problem by considering only one element
    of the mesh and only one edge of the box.Okay.
    suppose ABCD
    is a 3D quadrilateral element and PQ is the edge
    passing through the element.i will pass a function
    with coordinates of ABCD and P (startpoint of
    edge)coordinate and its normal vector,if there is an
    intersection the function should return 2 elements
    according to intersection
    now we have element ABCD and an edge with P and its
    normal vector,now we have intersection between element
    and edge from p at X and Y, now the algorithm should
    return AXYD as one element and XBCY as second
    element.please help me out in solving this task.
    Thanks in advance.I'll assume you mean 2D, planar, linear quad. I think the general 3D problem would entail surfaces and be much more difficult. If you use higher order shape functions the 2D problem isn't trivial, because then you might have more than two intersections.
    It COULD return two points of intersection, but you'll have to be careful about special cases:
    (1) The edge could intersect just one of the four corners,
    (2) The edge could coincide with an edge of the element,
    (3) The edge could miss the element entirely and not intersect.
    You'll have to decide what to do in the degenerate cases. The sensible thing would be to do nothing and leave the element alone.
    You'll also be concerned about mesh quality when you're done. Near degenerate elements won't perform well when you analyze them. Will you try to correct these after the fact?
    What if you end up with triangular elements? An edge might slice off a triangle and leave you with a five-noded element. What will you do with those? Create two triangles to get back to a quad? It's not so easy. You really should look into quadtree meshing. There are more general ways to attack a problem like this.
    What kind of physics are you ultimately trying to capture? What are you really doing here?
    You've described the algorithm fairly well, even if you haven't thought it all the way through.
    What's the problem? You'll have to write the code. No one will do that for you. Write some and come back with specific questions if you have difficulties. This is a Java forum, after all.

  • Rotation of bounding box ?

    I know I can get the transformation info on a sprite to work out the position of a bounding box used for collision detection, but if the image is being rotated, how can I rotate the bounding box for a more accurate collision test.
    the image is rectangular so a square(ish) bounding box won't do.

    1. Are we operating under the same definition of
    "bounding box?" My experience has always been that a
    bounding box is the region in which a sprite is
    counted as existing for the purpose of collision
    detection. I didn't see any collision detection in
    that code.
    2. If we -are- talking about collision detection, I
    will now (after review) agree with you that the
    Polygon object doesn't have all of the functionality
    needed. However, an object which represents a
    bounding polygon could be used quite nicely in this
    situation, as it could be freely rotated internally
    and fixed to a given point on the sprite.yes, bounding polgons are sometimes used - but the point of bounding rectangles, or bounding circles, is that they are cheap in terms of computation.
    calculating in the intersection of 2 polygons is not simple, and not cheap.
    Additionally, the most significant content of my post
    was the corner detection; no two bounding polygons,
    regardless of their orientation, can be intersecting
    if none of the corners for either polygon is
    contained within the other.yes they can, very easily infact.
    not sure how good this is going to look /me tries some ascii art ;]
    1
    4oox xoo5
    ox xo
    x x
    3xxxxxxx2
    6
    its 2 triangles {1,2,3} and {4,5,6} arranged to overlay each other (they form a star shape).
    >
    Am I misunderstood as to the purpose of a bounding
    box? Let me know, please. :) Thanks!rob,

  • Text put into a canvas element with context.fillText() always has a black box where each letter goes. If the text is black you just see the black rectangle. If the text is not black you see it on the black bounding box. Surely this is not right.

    This has happened on the last few versions of firefox, as long as canvas has been supported. I see other people's screen shots from canvas tutorials, and the text always looks normal. On my system, any text put into a canvas element via context.fillText() will have a black bounding box for each letter, sized appropriately for the letter. If the text is black, of course you only see rectangles. If the text is a contrasting color, then you can read it, but it looks bizarre.

    Thomas...same kind of crap here.
    I used Custom Text - entered a sentence, hit return, entered another.
    Set to 72 pt.
    The default alignment is centred - I want left aligned text...the text start point stays at the centre of frame and the sentence runs off the edge of the bounding box.
    There is no settings in the Text or Title inspector dialog to correct that!
    Using Transform will not sort it!

  • Bounding boxes appear in Acrobat after exporting from InDesign

    Whenever I create outline fonts in my CS3 version of InDesign (I haven't upgraded to CS4 on this one program yet), I'm left with some very strange thin white lines surrounding some or all of the resulting letters that look suspiciously like bounding boxes. This never seems to occur if I don't create outline fonts, but simply embed the fonts and create a PDF using the Export command, so I have to believe the anomaly has something to do with this conversion process within the program. If I use illustrator CS4 to create outline fonts and then place them within my InDesign documents, I don't appear to have the problem. However, that's not a very desirable solution as it negatively impacts the fluidity of layouts and the ease of design, both of which I use in design for.
    And yes, these small thin white lines do print, so the problem is far more than merely academic.
    Has anyone else ever experienced this issue, and if so, how did you solve the problem (assuming you did)?

    Sorry about that, I apparently forgot to attach the file; have done so now.
    The method I'm using for creating outlines is simply to use the "Create Outlines" command under the Type menu within InDesign. Then I create my PDF files by using the Export command under the File menu and choosing the PDF/X1a option. 99% of the time I get perfect results, it's only when I try to make outline type that I encounter this problem. You'll clearly see the artifacts in question in the example attached.
    I don't know whether or not the press would have printed these artifacts, as you suggest, since no printer has been willing to execute a file that shows any anomaly in the proof process. I can't say that I blame them.
    Hopefully you will see what I'm talking about and can recommend a solution, though I like your idea of simply giving them a properly executed file and then telling them to get a life. It hasn't worked so far, as I unfortunately deal with a lot of Neanderthals around here, but I suppose it's worth putting forth again the next time this issue arises. It will.
    By the way, no print house of my choosing is this far behind the curve, if at all. These cavemen are always printers who have long-standing relationships with my clients, and for whatever reason (generally lowest cost I'm sure), the clients think they hung the moon. We, of course, no otherwise, but it does it profit a designer to tell his client he or she is crazy for using a printer who is a decade behind the technology curve.
    We cowboy up and seek solutions, eh?

  • I have 4 equal oblong shape created with borders How do I go about knowing what size the selection area is so that I can crop an image to fit. I don't want to use paste in then adjust the bounding box to suit

    I have 4 equal oblong shape created with borders How do I go about knowing what size the selection area is so that I can crop an image to fit. I don't want to use paste in then adjust the bounding box to suit

    What do you mean a moderator

  • Is there a way to tighten a text bounding box?

    Hey all,
    I've looked before but never found a definitive answer to this question:
    Is there a way to tighten the text bounding box without converting it to outlines?
    I work for a screen printer, and want to figure out a way to tighten the bounding box without changing the leading and without converting it to outlines in order to be able to edit said text. We deal with a lot of clients who send us names, that are often misspelled, and after an initial proof need to be corrected. Sometimes we need to center this text to an object.
    Illustrator's bounding box, unlike that of Corel (which is our primary program, and won't open AI files) includes the leading below the type, so when you center it, it's not visually centered:
    So I guess my real question is is there a way to get the text centered (as seen below) without converting the text to outlines, or messing with the leading, or is there a way to tighten the bounding box?
    Thanks in advance!
    -K

    Combat and Dandreu,
    You may use this silly way:
    1) Tick Edit>Preferences>General>Use Preview Bounds;
    2) Select the Type and Effect>Path>Outline Object.
    That will reduce the Bounding Box to the actual bounds of the letters so you can centre as you wish.
    Remember to untick Edit>Preferences>General>Use Preview Bounds before you get a reverse issue.

  • CS2 Need to set text bounding box to snap to exact measurement, not em size and without leading

    I am currently using CS2 working in a sign shop designing signs, banners and vehicle lettering.
    When working with text I need to know the exact letter height, not the em and without the leading. I need it exactly the way it would measure if converting the text to outlines. The reason I need this information is that when I output the lettering to a cutter/plotter to cut vinyl media I need to know the exact measurement so I can nest my lettering on my media size. The media is typically 24" wide which gives me 22.5" of available space once the pinch rollers on the machine are considered. Pinch rollers are rollers that engage a knurled driving wheel and "pinches" the media between them and thus guides the media through the plotter. Of course, when using any media one must make the best use of it to avoid making scrap or using more than is needed for the job at hand. Converting text to outlines gives me that measurement.
    One time awhile back I did a google search on this and found a one or two button fix that made the bounding box snap to the exact "ruler" height of the text. It worked great. But I got away from design work for a short period. When I returned I'd forgotten the process. Back when I did find it I never bookmarked or made a text file explaining the process and I'm ost in finding it again.
    I don't know exactly how I worded the google search but the answer I was looking for came up on the first page. That's probably why I didn't feel the need to bookmark it or write it down. Now, I've googled dozens of different wordings for my question and get nothing. It's likely a nomenclature/jargon issue and I've yet to stumble on it again.
    If anyone could help out I would so greatly appreciate it. As it is, when I get to the point that I need to know the exact ruler height of my lettering I convert my text to outlines. But then, as sometimes happens, I'll desire to change the font or try someting different but the text is not live so I'll have to start over with that line of lettering.
    I sincerely hope my explanation of my questions makes sense to anyone who might be reading this.

    Jacob Bugge, you are a blessing. This effect not only saves me time but avoids a lot of frustration when a client wants to change some copy or I commit a spelling error or have some other brain malfunction. Not to mention the sometimes hundreds of single words or number groups I must fit onto an artboard set to my available media space.
    Option 2 is exactly what I was looking for and I'll remember it forever now as I've spent parts of the past week searching that answer only to hear over and over again, "You can't do that in Illustrator".
    Thank you so much for your quick response!

  • Can you view text outside of the canvas? as with the view menu you can see animation paths, bounding boxes and handles??? many thanks

    re: Motion 5
    can you view text outside of the canvas? as when using the view menu you can see animation paths, bounding boxes and handles???
    I'm in the middle of a text animation design treatment and unless my memory is completely failing I thought this was an option.
    An example would be selecting all layers and being able to see all bounding boxes and animation paths while moving along the timeline.
    Of course this could be quite a mess if you couldn't selectively chose which layers, its just with this current project it would be so helpful if
    I could see the text beyond the canvas to aid in my animations.
    many thanks,
    robert
    Motion 5
    2014 MacBook Pro 2.6Ghz i7
    16GB RAM
    OS X 10.9.5
    2011 Mac Pro
    4 Boot drives OS X 10.9.4, 10.10, 10.7, 10.8
    960GB OWC Mercury Accelsior_E2 PCI Express SSD (Current screaming fast boot drive)
    64GB RAM

    thanks for both of your responses
    I do understand shift + v " to "Show Full View Area" and shift + z to fill screen, etc.
    and command + & - for zooming
    what I'd like to do is selectively view, say, the text outside of the canvas as you can see the bounding box
    which contains the text or object when selecting one or all layers in the layers column
    I haven't used this feature in a while though I do recall using it in the past.
    Any help would greatly appreciated
    thanks,
    R.

  • How can I align a text object by the visible text and NOT by its bounding box?

    Illustrator CS4.
    I am trying to align some text to the center of the artboard. The bounding box is bigger than the text, so when I try to align it to the artboard it doesn't actually center align the artwork as I need it to. The text is needing to be aligned with another text object, so I can't just center align the text and then align to the artboard (which would eliminate the bounding box problem, I think). To make matters worse, the text I want to align has a stroke.
    The only way I know to currently align the text properly is to convert it to outlines. This is what I've done, but I need something better. I want to be able to have my illustrator file that has all editable text and then be able to make a separate identical file with all text converted to outlined paths. The only thing holding me back right now is that I can't get the exact alignment while everything is still as text.

    The solution is to simple to believe and probably why you over looked it.
    You make two text frames to exactly the height and width of the text. You position the text in the relative location and then group the text frames  then center that group on the artboard.
    Like such:
    If you ever want to add text that should be no problem but you have to re center.

  • How do I get rid of the dotted line on right side of bounding box

    Ever since I upgraded to CS5, I seem to have a broken dotted line along the right side of the bounding box of the png logo that was created for my company.  It wasn't there before. I've gone back to my original back up of the logo and this broken line is in all the versions now.
    Whenever I use the artwork a single dash/dotted line is left on the far right, where the right vertical line of the bounding box would have been. You can see it in the image below on the right.  Its a faint white line but when printed on a banner its stark white.  The line falls just above the last "A" in Alberta.
    I can use Illustrator and Photoshop basics and but have trouble when I get into problems like this.
    Can anyone help me figure out why its there and how to get rid of it?
    I would appreciate any help!
    Thanks.

    Wade and Monica,
    Thanks for your help.
    Wade, it hit me when you asked "why is it a png" file and I realized that I was using the wrong file.  Sometimes its hard to see the forest for the trees!  Problem for banner artwork fixed and I have now used the correct logo file so no more dotted line.
    The dotted line only appears on the the png version of the logo.  There's no coloured background on the logo file.  She gave me the file as both an eps and a png file. I'm pretty sure she created the logo in Illustrator.  I've been using the png file for the website, which is what I thought it worked well for.  And the eps one for my print materials.
    I have no clue why I grabbed the png instead of the eps logo file I usually use, but thanks for pointing out the obvious since I wasted time trying to fix it and was getting very frustrated at what had suddenly gone "wrong".
    I still have that dotted line on the png file of the logo but I'll have to figure that out another day.
    Thanks again!
    Hasmi

  • Can someone help me in building an interactive PDF form with dynamic bounding box?

    Hi Guys,
    I need to create an interactive PDF form which will contain images, text and fields.
    This is how it would be laid out:
    Header Image at the top.
    Below that a Text Box with a question "Choose the number of licenses" and a drop down option from 1 to 10.
    Depending on what they select, I need the following to be displayed.
    The following should be encapsuled by a bounding box.
    If "1" is selected. "Username: <blank field>    Password: <blank field>
    Then a button which says "Click Here To Login To Your New Account".
    The bounding box should end here.. and I have more text and images below.
    This I could achieve! But now if I select "2" I would need the bounding box to automatically become taller to accommodate two rows with "Username <blank> Password <blank>
    The bounding box needs to expand or contract based on the number selected in the drop down.
    Would love to here your thoughts on this!
    Cheers,
    Rajiv

    If you were to look at the spec for PDF, you'd see that that is probably not possible with a PDF file.
    But, I encourage you to ask this question in the Acrobat PDF Forms forum where the forms experts reside, and perhaps they could suggest an answer. JavaScript can be used, and perhaps that's the answer:
    PDF Forms

  • In photoshop elements 13, the bounding box is very light and hard to see.  Can this be darkened?

    In photoshop elements 13, the bounding box is very light and hard to see.  Is there anyway that this can be darkened?

    When my wife first logs in, this is the screen that comes up:
    So we hit "Continue" and the next screen comes up:
    So then we click "This is Okay" and the next screen comes up:
    It doesn't matter what we select here; the next screen is always the following:
    And here is where it dead ends. There's no place to enter an alternate name under 40 characters, there's nothing to click on. And this has been happening every time my wife has tried to log in.

  • WFS Bounding Box question

    Hello,
    I've integrated a WFS layer into an Oracle Maps application and am having errors when I try to do anything that involves a 'bounding box' type query, like zooming, panning etc. A "zoomToTheme()" function works fine as this does not use the bounding box.
    Looking at the logs on the WFS server (GeoServer 2.1.3) the request has this form :
          <ogc:Filter>
            <ogc:BBOX>
              <ogc:PropertyName>CCW:sssi_polygon/CCW:the_geom</ogc:PropertyName>
              <gml:Box srsName="EPSG:27700" xmlns:gml="http://www.opengis.net/gml">
                   <gml:coordinates decimal="." cs="," ts=" ">194769.23076923075,291076.92307692306 358615.3846153846,373000.0</gml:coordinates>
              </gml:Box>
            </ogc:BBOX>        
          </ogc:Filter>However the WFS server doesn't like the "CCW:sssi_polygon/CCW:the_geom" PropertyName and raises this error :
       <ServiceException code="InvalidParameterValue">
          Illegal property name: CCW:sssi_polygon/CCW:the_geom
    Details:
    org.geoserver.wfs.WFSException: Illegal property name: CCW:sssi_polygon/CCW:the_geomIs this something that MapViewer is doing wrong or the WFS server? Looking at other WFS examples it seems that MapViewer is wrong, however I am no WFS expert!
    Is there anyway that this can be configured to just pass through "CCW:the_geom" or even "the_geom" instead?
    Any guidance would be very much appreciated.
    Steve H

    Additional info :
    This layer works perfectly well in the Map Builder and looking at the request made by Map Builder it appears to be doing it 'correctly' :
    <ogc:Filter>
      <ogc:BBOX>
        <ogc:PropertyName>CCW:the_geom</ogc:PropertyName>
        <gml:Box srsName="EPSG:27700" xmlns:gml="http://www.opengis.net/gml">
             <gml:coordinates decimal="." cs="," ts=" ">211511.8058591216,329532.7730012691 324247.2566166974,372875.7230012691</gml:coordinates>
        </gml:Box>
      </ogc:BBOX>        
    </ogc:Filter>Thanks,
    Steve

  • Enlarged bounding box around imported vector images (InDesign/Illustrator CC 2014)

    Hi all, I've searched the forum for an answer but can't seem to find one. Hopefully someone can help.
    Ever since my upgrade to CC2014, whenever I import a vector image from Illustrator into InDesign, the image comes in with an expanded bounding box. Unlike in the old days (i.e., the moment before I upgraded), when the bounding box would exactly enclose my image with no extra white space on any of the sides.
    Sometimes the bounding box is small and sometimes it's gigantic. I cannot determine any rhyme or reason why it varies. Sometimes it's wider on the sides than on the top/bottom. Other times it's gigantic on one side but not the others. Basically, it's all over the place with no consistency that I can determine.
    I find it incredibly visually distracting to have these weird-sized bounding boxes around my art, and it sucks to have to constantly resize them on every imported image.
    I promise there are no guides, stray points, etc. in the Illustrator files. There is absolutely nothing "invisible yet there" that would create these expanded bounding boxes.
    Two samples are below.
    Note on this first one that the bounding box is wider at the right than the left.
    On this second sample, note that the bounding box is gigantic in general, but especially at the top, and it's smaller on the sides/bottom. Huh?
    Any ideas? I desperately want this to stop. Just want a bounding box that exactly encloses my artwork after I import it.
    Thank you for your ideas or suggestions,
    Laurie

    Hi Bob, thanks very much for this info. I figured there was a checkbox hidden somewhere...
    I tried all of the cropping options and although it seems like this would be a fix, it's unfortunately not fully resolving the issue.
    The option that gets me closest is "crop to art." However, as you can see from the sample below, there's still a pretty large gap at the bottom, as well as a small one at the left side. (The top and right actually are cropped to the art, as requested.)
    Do you have any other suggestions of things I can try? Or does anyone else have any ideas?
    Thanks again,
    Laurie

Maybe you are looking for

  • Firefox 3.6.1 is reading at Firefox 2.0

    I recently updated my browser from Firefox 2.0 to the latest version, Firefox 3.6.1. I had neglected to update for awhile, and since not everything was running correctly, I went ahead and installed the new browser. However, my computer still thinks I

  • Limit the number of records per page in webi

    Hello All, How do i limit the number of records per page in webi? i was asked to have not more than 20 records per page. In " NUmber of Vertical records per page"(Quick display mode) the default value was 100, i am trying to set it to 20 ...but its n

  • How do I turn the sound off in iChat (like the swishing noises)

    Is there anyway to just disable sound on iChat...its really simple on AIM but I like iChat better...i just dont like any noises from it..like when I'm playing music i dont want the swishing noise...is there anyway to turn all sound off.. thanks john

  • How much data is used when using facetime over 4g

    How much data is used when using facetime over 4g. Say a 10 min call over facetime, will it use few MB or more. Thanks, Manish

  • TARGET Column in crs_stat output

    This what oracle doc says about the TARGET column in crs_stat output http://docs.oracle.com/cd/B19306_01/rac.102/b14197/crsref.htm The TARGET value shows the state to which Oracle Clusterware attempts to set the resource. If the TARGET value is ONLIN