## "Fossies" - the Fresh Open Source Software Archive

### Member "brlcad-7.32.4/doc/mged/m.tex" (29 Jul 2021, 8613 Bytes) of package /linux/misc/brlcad-7.32.4.tar.bz2:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 \chapter{RT MATERIAL TYPE, PROPERTIES, and COLOR}
2
3 First the solids must be formed into a "region", e.g.:
4
5 {\em\center
6 r ball u torus u tube-hole
7 }
8
9 To change material type, properties and color use the "mater" command:
10
11 {\tt
12 mged> {\em mater base} \\
13 Material = \\
14 Material?  (CR to skip) {\em plastic} \\
15 Param = \\
16 Parameter string? (CR to skip) {\em sh=10 dl=0.2 sp=0.8 re=0.75} \\
17 Color = (No color specified) \\
18 Color R G B (0..255)? (CR to skip) {\em 112 219 147} \\
19 Inherit = 0:  lower nodes (towards leaves) override \\
20 Inheritance (0|1)? (CR to skip) {\em 0} \\
21 mged> \\
22 }
23
24 For the values in Parameter String for material Plastic'',
25 you can enter such things as:
26 "shinyness (sh)",
27 "specular lighting fraction (sp)",
28 "diffuse lighting fraction (di)",
29 "transmission fraction (tr)",
30 "reflection fraction (re)", and
31 "refractive index (ri)".
32 Two formulas must hold to keep the material physical'':
33 sp + di=1.0, and tr + re=1.0.
34
35 Suggested values for these properties are listed below:
36
37 {\center sh=10, dl=0.2, sp=0.8, re=0.75}
38
39 NOTE:  Not all of these fields need to be input, you
40 can use the system defaults for the rest.
41
42 To display objects in different colors on the screen, each object must
43 be a region with its own material properties and colors.  All regions must be
44 displayed on screen before a ray tracing can be performed (region objects can
45 have cutouts to display other parts).
46
47 \begin{tabular}{r r r l}
48 R & G & B &         COLOR \\
49 112 & 219 & 147 & aquamarine \\
50 50 & 204 & 153 & med aquamarine \\
51 0 & 0 & 0 & black  \\
52 0 & 0 & 255 & blue  \\
53 95 & 159 & 159 & cadet blue  \\
54 66 & 66 & 111 & corn flower blue \\
55 107 & 35 & 142 & dk slate blue  \\
56 191 & 216 & 216 & light blue  \\
57 143 & 143 & 188 & light steel blue \\
58 50 & 50 & 204 & medium blue  \\
59 127 & 0 & 255 & medium slate blue \\
60 47 & 47 & 79 & midnight blue  \\
61 35 & 35 & 142 & navy blue  \\
62 50 & 153 & 204 & sky blue  \\
63 0 & 127 & 255 & slate blue  \\
64 35 & 107 & 142 & steel blue  \\
65 255 & 127 & 0 & coral  \\
66 0 & 255 & 255 & cyan  \\
67 142 & 35 & 35 & firebrick  \\
68 204 & 127 & 50 & gold  \\
69 219 & 219 & 112 & golden rod  \\
70 234 & 234 & 173 & med goldenrod  \\
71 0 & 255 & 0 & green  \\
72 47 & 79 & 47 & dark green  \\
73 79 & 79 & 47 & dk olive green  \\
74 35 & 142 & 35 & forest green  \\
75 50 & 204 & 50 & lime green  \\
76 107 & 142 & 35 & med forest green \\
77 66 & 111 & 66 & medium sea green \\
78 127 & 255 & 0 & med spring green \\
79 143 & 188 & 143 & pale green  \\
80 35 & 142 & 107 & sea green \\
81 0 & 255 & 127 & spring green \\
82 153 & 204 & 50 & yellow green \\
83 47 & 79 & 79 & dk slate grey \\
84 84 & 84 & 84 & dim grey \\
85 168 & 168 & 168 & light grey \\
86 \end{tabular}
87
88 \begin{tabular}{r r r l}
89 R & G & B &         COLOR \\
90 159 & 159 & 95 & khaki  \\
91 255 & 0 & 255 & magenta \\
92 142 & 35 & 107 & maroon \\
93 204 & 50 & 50 & orange \\
94 219 & 112 & 219 & orchid \\
95 153 & 50 & 204 & dark orchid \\
96 147 & 112 & 219 & medium orchid \\
97 188 & 143 & 143 & pink \\
98 234 & 173 & 234 & plum \\
99 255 & 0 & 0 & red \\
100 79 & 47 & 47 & indian red \\
101 219 & 112 & 147 & medium violet \\
102 255 & 0 & 127 & orange red \\
103 204 & 50 & 153 & violet red \\
104 111 & 66 & 66 & salmon \\
105 142 & 107 & 35 & sienna \\
106 219 & 147 & 112 & tan \\
107 216 & 191 & 216 & thistle \\
108 173 & 234 & 234 & turquoise \\
109 112 & 147 & 219 & dk turquoise \\
110 112 & 219 & 219 & med turquoise \\
111 79 & 47 & 79 & violet \\
112 159 & 95 & 159 & blue violet \\
113 216 & 216 & 191 & wheat \\
114 252 & 252 & 252 & white \\
115 255 & 255 & 0 & yellow \\
116 147 & 219 & 112 & green yellow
117 \end{tabular}
118
119 material types are:  plastic
120                                mirror
121                                glass
122                                texture
123
124 Shinyness (i.e.:  sh=16)
125
126 Refractive index for:  crown glass = 1.52
127                               Flint glass = 1.65
128                               Rock salt = 1.54
129                               Water = 1.33
130                               Diamond = 2.42
131
132 Transmission fraction for a mirror:  re=1.0 (tr=0)
133
134 \chapter{RAYTRACING YOUR CREATION}
135
136 Once you have finished creating all your solids, positioned them in
137 their correct relationships to each other, formed all your regions (forming
138 your finished object), created groups (if required), you can now do a ray-
139 tracing of the view displayed on the screen.
140
141 Note!  If you want to display solids or objects (collection of solids
142 regioned together) of different colors, each of the solids or objects must be
143 separate regions so you can give them a specific color.
144
145 The raytracing command is
146 {\em\center
147   rt [-s\#]
148 }
149
150 This command produces a color shaded image of the solids or objects on
151 the display.  This color shaded image  will appear on a frame buffer display.
152 The resolution of the image (number of rays) is equal to "\#" from the "-s"
153 option.  If the "-s" option is absent, 50x50 ray solution will be used (very
154 course raytrace).  The higher the "-s" option the better the raytracing, but
155 it takes longer to display.
156 Recommended optimum value of "-s" option for picture
157 quality and speed of display is 256!.  Some examples follow:
158
159 {\em
160              rt -s128 \\
161              rt \\
162              rt -s256 \\
163 }
164
165 When the rt command is given the text and graphic window will appear,
166 then the frame buffer starts to appear (the picture window).  The first scanned
167 display will be what was previously stored in it, it will then overwrite it
168 with your picture; sometimes two buffer scans are displayed before yours.
169
170 The default background color is blue with steel grey colored solids and
171 objects.  The terminal will beep when the scanned picture is finished; press
172 return to get back to the "text and graphic" window.
173
174 With the blue background it is sometimes hard to visualize the raytraced
175 picture; two things you can do to improve the situation is:
176      (a)  Make separate regions for all solids and objects, so that you can
177 assign a specific color to each region; this can be a time consuming task if
178 you have a lot of solids and objects.
179      (b)  Construct as a separate region, three thin flat plates to form two
180 walls with a bottom, as shown below; using "make name arb8",
181 then solid editing this arb8, using move faces to the required thickness,
182 then use command "cp"
183 (copy command) to make two more copies which you can rotate to their
184 respective relationships, then translate all three into the correct positions
185 relative to each other and the solids and objects you are displaying.
186
187 The advantage of doing this is to give the light source something
188 to reflect off, giving back lighting; improving contrast considerably.
189 With the
190 three plates formed into their own region you can delete them from the screen
191 with the "d" command, rotate your creation then re-display your plates (walls)
192 with the "e" command to do another rt, the walls need to be deleted from the
193 display when you rotate your objects,
194 otherwise everything will rotate together.
195
196                                    Figure
197
198 A bonus of having constructed these three walls is that you can quickly
199 change the material type to "mirror" so that you can get reflections of the
200 three hidden faces.
201
202 \chapter{CONCLUSIONS}
203
204 MGED performs two basic functions:
205 viewing and editing.
206 The standard viewing capabilities of zooming, slewing,
207 slicing, and rotation are available.
208 Likewise, all the standard editing features are also available.
209 The user easily traverses the hierarchical data structure, applying
210 the editing functions of rotation, translation, and scaling to any
211 position in the hierarchy.
212 The hierarchical structure can be modified and regrouped and regions
213 created and modified.
214 Specific parameter editing can also be applied to the solids to produce
215 any shape solid desired.
216
217 For several decades, the production and modification of geometric models
218 suitable for sophisticated engineering analysis
219 has been a slow, labor-intensive procedure.
220 In an effort to improve the response time of geometric models,
221 the Ballistic
222 Research Laboratory (BRL) has developed an interactive model editor
223 for their combinatorial solid geometry modeling system (The BRL-CAD Package).
224 The user interface to the geometry of these models
225 is a program called the Multi-device Graphics Editor (MGED)
226 that is designed to replace the
227 traditional manual method
228 for producing and modifying model databases.
229 Using MGED, the geometric models
230 are interactively viewed, modified, and constructed with immediate visual
231 feedback at each step.
232 When desired, the MGED editor can be operated without the need for
233 explicit numerical input
234 and opens a new dimension in the model building process.
235 MGED has made great gains in reducing the bottleneck in
236 the creation of high resolution geometric models.