Difference between revisions of "BMPRegion Command"

From OSUPDOCS
Jump to navigation Jump to search
Line 1: Line 1:
This page for MPM use only
An advanced feature of [[NairnMPM]] is that you can create material property directly from images.


  <BMP name="MatImage.bmp" width="50" angles="MatAngles.bmp">
== Introduction ==
  <Origin x="0" y="0"/>
 
  <Intensity mat="2" imin="76" imax="255">
== BMPRegion Commands ==
    <Thickness units="mm">1</Thickness>
 
  </Intensity>
In scripted files, an image is converted into material points using:
  <Intensity mat="3" imin="1" imax="75">
 
    <Thickness units="mm">1</Thickness>
BMPRegion (bmpPath),(width),<(height)>,<(anglesPath)>
  </Intensity>
  Origin (xO),(yO),<(zO>,<(flip)>
  <Intensity imin="0" imax="255" minAngle="0.000000" maxAngle="90.000000"/>
  Intensity (matID),(grayMin),(grayMax),<(prop),(value)>,...
    . . .
  Intensity "angles",(gray1),(gray2),(angle1),(angle2)
EndRegion
 
In <tt>XML</tt> files, the command block is
 
  <BMP name="(bmpPath)" width="(width)" height="(height) angles="(anglesPath)>
  <Origin x="(xO)" y="yO" z="zO"/>
  <Intensity mat="(matID)" imin="(gramMin)" imax="(grayMax)">
      (property command options)
  </Intensity>
    . . .
  <Intensity imin="(gray1)" imax="(gray2)" minAngle="(angle1)" maxAngle="(angle2)"/>
  </BMP>
  </BMP>
where
* <tt>(bmpPath)</tt> is the full or relative path name to the BMP file. The file must be an uncompressed, gray-scale, BMP file with 8 or less bits per pixel. The most useful is an 8-bit file with 256 levels of gray.
* <tt>(width)</tt> and <tt>(height)</tt> specify the width and height for the image, but there are [[#Image Width and Height|several ways to specify them]].
* <tt>(anglesPath)</tt> is an optional full or relative path name to a mask BMP file whose intensities determine the material angle for rotation about eh z axis when setting anisotropic material points. The file must be an uncompressed, gray-scale, BMP file with 8 or less bits per pixel. The file must be exactly the same size (horizontal and vertical pixels) as the image file in <tt>(bmpPath)</tt>.
Inside can be intensity, origin and rotates.
=== Image Width and Height ===
(note: when a second file is specified in scripted files, both <tt>(width)</tt> and <tt>(height)</tt> must be entered to preserve argument numbering, but either one can be -1 to preserve aspect ratio).

Revision as of 10:30, 31 December 2013

An advanced feature of NairnMPM is that you can create material property directly from images.

Introduction

BMPRegion Commands

In scripted files, an image is converted into material points using:

BMPRegion (bmpPath),(width),<(height)>,<(anglesPath)>
  Origin (xO),(yO),<(zO>,<(flip)>
  Intensity (matID),(grayMin),(grayMax),<(prop),(value)>,...
    . . .
  Intensity "angles",(gray1),(gray2),(angle1),(angle2)
EndRegion

In XML files, the command block is

<BMP name="(bmpPath)" width="(width)" height="(height) angles="(anglesPath)>
  <Origin x="(xO)" y="yO" z="zO"/>
  <Intensity mat="(matID)" imin="(gramMin)" imax="(grayMax)">
     (property command options)
  </Intensity>
    . . .
  <Intensity imin="(gray1)" imax="(gray2)" minAngle="(angle1)" maxAngle="(angle2)"/>
</BMP>

where

  • (bmpPath) is the full or relative path name to the BMP file. The file must be an uncompressed, gray-scale, BMP file with 8 or less bits per pixel. The most useful is an 8-bit file with 256 levels of gray.
  • (width) and (height) specify the width and height for the image, but there are several ways to specify them.
  • (anglesPath) is an optional full or relative path name to a mask BMP file whose intensities determine the material angle for rotation about eh z axis when setting anisotropic material points. The file must be an uncompressed, gray-scale, BMP file with 8 or less bits per pixel. The file must be exactly the same size (horizontal and vertical pixels) as the image file in (bmpPath).

Inside can be intensity, origin and rotates.

Image Width and Height

(note: when a second file is specified in scripted files, both (width) and (height) must be entered to preserve argument numbering, but either one can be -1 to preserve aspect ratio).