Misplaced Pages

BRL-CAD

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Constructive solid geometry ( CSG ; formerly called computational binary solid geometry ) is a technique used in solid modeling . Constructive solid geometry allows a modeler to create a complex surface or object by using Boolean operators to combine simpler objects, potentially generating visually complex objects by combining a few primitive ones.

#296703

46-437: BRL-CAD is a constructive solid geometry (CSG) solid modeling computer-aided design (CAD) system. It includes an interactive geometry editor, ray tracing support for graphics rendering and geometric analysis, computer network distributed framebuffer support, scripting, image-processing and signal-processing tools. The entire package is distributed in source code and binary form. Although BRL-CAD can be used for

92-595: A binary search algorithm (with cost ⁠ O ( log ⁡ n ) {\displaystyle O(\log n)} ⁠ ) outperforms a sequential search (cost ⁠ O ( n ) {\displaystyle O(n)} ⁠ ) when used for table lookups on sorted lists or arrays. The analysis, and study of algorithms is a discipline of computer science . Algorithms are often studied abstractly, without referencing any specific programming language or implementation. Algorithm analysis resembles other mathematical disciplines as it focuses on

138-468: A flowchart offers a way to describe and document an algorithm (and a computer program corresponding to it). It has four primary symbols: arrows showing program flow, rectangles (SEQUENCE, GOTO), diamonds (IF-THEN-ELSE), and dots (OR-tie). Sub-structures can "nest" in rectangles, but only if a single exit occurs from the superstructure. It is often important to know how much time, storage, or other cost an algorithm may require. Methods have been developed for

184-680: A computer-executable form, but are also used to define or document algorithms. There are many possible representations and Turing machine programs can be expressed as a sequence of machine tables (see finite-state machine , state-transition table , and control table for more), as flowcharts and drakon-charts (see state diagram for more), as a form of rudimentary machine code or assembly code called "sets of quadruples", and more. Algorithm representations can also be classified into three accepted levels of Turing machine description: high-level description, implementation description, and formal description. A high-level description describes qualities of

230-719: A computing machine or a human who could only carry out specific elementary operations on symbols . Most algorithms are intended to be implemented as computer programs . However, algorithms are also implemented by other means, such as in a biological neural network (for example, the human brain performing arithmetic or an insect looking for food), in an electrical circuit , or a mechanical device. Step-by-step procedures for solving mathematical problems have been recorded since antiquity. This includes in Babylonian mathematics (around 2500 BC), Egyptian mathematics (around 1550 BC), Indian mathematics (around 800 BC and later),

276-479: A final ending state. The transition from one state to the next is not necessarily deterministic ; some algorithms, known as randomized algorithms , incorporate random input. Around 825 AD, Persian scientist and polymath Muḥammad ibn Mūsā al-Khwārizmī wrote kitāb al-ḥisāb al-hindī ("Book of Indian computation") and kitab al-jam' wa'l-tafriq al-ḥisāb al-hindī ("Addition and subtraction in Indian arithmetic"). In

322-466: A package subsequently began in 1983; the first public release was made in 1984. BRL-CAD became an open-source project in December 2004. The BRL-CAD source code repository is the oldest known public version-controlled codebase in the world that's still under active development, dating back to 1983-12-16 00:10:31 UTC . Constructive solid geometry In 3D computer graphics and CAD , CSG

368-525: A programmer can write structured programs using only these instructions; on the other hand "it is also possible, and not too hard, to write badly structured programs in a structured language". Tausworthe augments the three Böhm-Jacopini canonical structures : SEQUENCE, IF-THEN-ELSE, and WHILE-DO, with two more: DO-WHILE and CASE. An additional benefit of a structured program is that it lends itself to proofs of correctness using mathematical induction . By themselves, algorithms are not usually patentable. In

414-703: A ray with both primitives that are being operated on, apply the operator to the intersection intervals along the 1D ray, and then take the point closest to the camera along the ray as being the result. Constructive solid geometry has a number of practical uses. It is used in cases where simple geometric objects are desired, or where mathematical accuracy is important. Nearly all engineering CAD packages use CSG (where it may be useful for representing tool cuts, and features where parts must fit together). The Quake engine and Unreal Engine both use this system, as does Hammer (the native Source engine level editor), and Torque Game Engine / Torque Game Engine Advanced . CSG

460-477: A sequence of operations", which would include all computer programs (including programs that do not perform numeric calculations), and any prescribed bureaucratic procedure or cook-book recipe . In general, a program is an algorithm only if it stops eventually —even though infinite loops may sometimes prove desirable. Boolos, Jeffrey & 1974, 1999 define an algorithm to be an explicit set of instructions for determining an output, that can be followed by

506-408: A sphere may be described by the coordinates of its center point, along with a radius value. These primitives can be combined into compound objects using operations like these: Combining these elementary operations, it is possible to build up objects with high complexity starting from simple ones. Rendering of constructive solid geometry is particularly simple when ray tracing . Ray tracers intersect

SECTION 10

#1732783276297

552-882: A variety of engineering and graphics applications, the package's primary purpose continues to be the support of ballistic and electromagnetic analyses. In keeping with the Unix philosophy of developing independent tools to perform single, specific tasks and then linking the tools together in a package, BRL-CAD is basically a collection of libraries, tools, and utilities that work together to create, raytrace, and interrogate geometry and manipulate files and data. In contrast to many other 3D modelling applications, BRL-CAD primarily uses CSG rather than boundary representation . This means BRL-CAD can "study physical phenomena such as ballistic penetration and thermal, radiative, neutron, and other types of transport". It does also support boundary representation. The BRL-CAD libraries are designed primarily for

598-416: Is a method or mathematical process for problem-solving and engineering algorithms. The design of algorithms is part of many solution theories, such as divide-and-conquer or dynamic programming within operation research . Techniques for designing and implementing algorithm designs are also called algorithm design patterns, with examples including the template method pattern and the decorator pattern. One of

644-581: Is a more specific classification of algorithms; an algorithm for such problems may fall into one or more of the general categories described above as well as into one of the following: One of the simplest algorithms finds the largest number in a list of numbers of random order. Finding the solution requires looking at every number in the list. From this follows a simple algorithm, which can be described in plain English as: High-level description: (Quasi-)formal description: Written in prose but much closer to

690-462: Is limited by each software package. Some software packages allow CSG on curved objects while other packages do not. An object is constructed from primitives by means of allowable operations , which are typically Boolean operations on sets : union , intersection and difference , as well as geometric transformations of those sets. A primitive can typically be described by a procedure which accepts some number of parameters ; for example,

736-460: Is no truly "correct" recommendation. As an effective method , an algorithm can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function . Starting from an initial state and initial input (perhaps empty ), the instructions describe a computation that, when executed , proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at

782-445: Is often used in procedural modeling . CSG can also be performed on polygonal meshes , and may or may not be procedural and/or parametric. Contrast CSG with polygon mesh modeling and box modeling . The simplest solid objects used for the representation are called geometric primitives . Typically they are the objects of simple shape: cuboids , cylinders , prisms , pyramids , spheres , cones . The set of allowable primitives

828-459: Is popular because a modeler can use a set of relatively simple objects to create very complicated geometry. When CSG is procedural or parametric, the user can revise their complex geometry by changing the position of objects or by changing the Boolean operation used to combine those objects. One of the advantages of CSG is that it can easily assure that objects are "solid" or water-tight if all of

874-439: Is that it is easy to classify arbitrary points as being either inside or outside the shape created by CSG. The point is simply classified against all the underlying primitives and the resulting boolean expression is evaluated. This is a desirable quality for some applications such as ray tracing . With CSG models being parameterized by construction, they are often favorable over usual meshes when it comes to applications where

920-453: Is useful for uncovering unexpected interactions that affect performance. Benchmarks may be used to compare before/after potential improvements to an algorithm after program optimization. Empirical tests cannot replace formal analysis, though, and are non-trivial to perform fairly. To illustrate the potential improvements possible even in well-established algorithms, a recent significant innovation, relating to FFT algorithms (used heavily in

966-1107: The Entscheidungsproblem (decision problem) posed by David Hilbert . Later formalizations were framed as attempts to define " effective calculability " or "effective method". Those formalizations included the Gödel – Herbrand – Kleene recursive functions of 1930, 1934 and 1935, Alonzo Church 's lambda calculus of 1936, Emil Post 's Formulation 1 of 1936, and Alan Turing 's Turing machines of 1936–37 and 1939. Algorithms can be expressed in many kinds of notation, including natural languages , pseudocode , flowcharts , drakon-charts , programming languages or control tables (processed by interpreters ). Natural language expressions of algorithms tend to be verbose and ambiguous and are rarely used for complex or technical algorithms. Pseudocode, flowcharts, drakon-charts, and control tables are structured expressions of algorithms that avoid common ambiguities of natural language. Programming languages are primarily for expressing algorithms in

SECTION 20

#1732783276297

1012-629: The Jacquard loom , a precursor to Hollerith cards (punch cards), and "telephone switching technologies" led to the development of the first computers. By the mid-19th century, the telegraph , the precursor of the telephone, was in use throughout the world. By the late 19th century, the ticker tape ( c.  1870s ) was in use, as were Hollerith cards (c. 1890). Then came the teleprinter ( c.  1910 ) with its punched-paper use of Baudot code on tape. Telephone-switching networks of electromechanical relays were invented in 1835. These led to

1058-792: The Ifa Oracle (around 500 BC), Greek mathematics (around 240 BC), and Arabic mathematics (around 800 AD). The earliest evidence of algorithms is found in ancient Mesopotamian mathematics. A Sumerian clay tablet found in Shuruppak near Baghdad and dated to c.  2500 BC describes the earliest division algorithm . During the Hammurabi dynasty c.  1800  – c.  1600 BC , Babylonian clay tablets described algorithms for computing formulas. Algorithms were also used in Babylonian astronomy . Babylonian clay tablets describe and employ algorithmic procedures to compute

1104-489: The U.S. Army Ballistic Research Laboratory (BRL) expressed a need for tools that could assist with the computer simulation and engineering analysis of combat vehicle systems and environments. When no CAD package was found to be adequate for this purpose, BRL software developers – led by Mike Muuss – began assembling a suite of utilities capable of interactively displaying, editing, and interrogating geometric models. This suite became known as BRL-CAD. Development on BRL-CAD as

1150-596: The United States, a claim consisting solely of simple manipulations of abstract concepts, numbers, or signals does not constitute "processes" (USPTO 2006), so algorithms are not patentable (as in Gottschalk v. Benson ). However practical applications of algorithms are sometimes patentable. For example, in Diamond v. Diehr , the application of a simple feedback algorithm to aid in the curing of synthetic rubber

1196-454: The algorithm itself, ignoring how it is implemented on the Turing machine. An implementation description describes the general manner in which the machine moves its head and stores data in order to carry out the algorithm, but does not give exact states. In the most detail, a formal description gives the exact state table and list of transitions of the Turing machine. The graphical aid called

1242-588: The algorithm's properties, not implementation. Pseudocode is typical for analysis as it is a simple and general representation. Most algorithms are implemented on particular hardware/software platforms and their algorithmic efficiency is tested using real code. The efficiency of a particular algorithm may be insignificant for many "one-off" problems but it may be critical for algorithms designed for fast interactive, commercial or long life scientific usage. Scaling from small n to large n frequently exposes inefficient algorithms that are otherwise benign. Empirical testing

1288-403: The analysis of algorithms to obtain such quantitative answers (estimates); for example, an algorithm that adds up the elements of a list of n numbers would have a time requirement of ⁠ O ( n ) {\displaystyle O(n)} ⁠ , using big O notation . The algorithm only needs to remember two values: the sum of all the elements so far, and its current position in

1334-413: The code execution through various routes (referred to as automated decision-making ) and deduce valid inferences (referred to as automated reasoning ). In contrast, a heuristic is an approach to solving problems that do not have well-defined correct or optimal results. For example, although social media recommender systems are commonly called "algorithms", they actually rely on heuristics as there

1380-521: The earliest codebreaking algorithm. Bolter credits the invention of the weight-driven clock as "the key invention [of Europe in the Middle Ages ]," specifically the verge escapement mechanism producing the tick and tock of a mechanical clock. "The accurate automatic machine" led immediately to "mechanical automata " in the 13th century and "computational machines"—the difference and analytical engines of Charles Babbage and Ada Lovelace in

1426-523: The early 12th century, Latin translations of said al-Khwarizmi texts involving the Hindu–Arabic numeral system and arithmetic appeared, for example Liber Alghoarismi de practica arismetrice , attributed to John of Seville , and Liber Algorismi de numero Indorum , attributed to Adelard of Bath . Hereby, alghoarismi or algorismi is the Latinization of Al-Khwarizmi's name; the text starts with

BRL-CAD - Misplaced Pages Continue

1472-427: The field of image processing), can decrease processing time up to 1,000 times for applications like medical imaging. In general, speed improvements depend on special properties of the problem, which are very common in practical applications. Speedups of this magnitude enable computing devices that make extensive use of image processing (like digital cameras and medical equipment) to consume less power. Algorithm design

1518-428: The geometric modeler who also wants to tinker with software and design custom tools. Each library is designed for a specific purpose: creating, editing, and ray tracing geometry, and image handling. The application side of BRL-CAD also offers a number of tools and utilities that are primarily concerned with geometric conversion, interrogation, image format conversion, and command-line-oriented image manipulation. In 1979,

1564-510: The geometry. These half-spaces are used to describe primitives that can be combined to get the final model. Another approach decouples the detection of primitive shapes and the computation of the CSG tree that defines the final model. This approach exploits the ability of modern program synthesis tools to find a CSG tree with minimal complexity. There are also approaches that use genetic algorithms to iteratively optimize an initial shape towards

1610-399: The goal is to fabricate customized models. For such applications it can be interesting to convert already existing meshes to CSG trees. This problem of automatically converting meshes to CSG trees is called inverse CSG . A resulting CSG tree is required to occupy the same volume in 3D space as the input mesh while having a minimal number of nodes. Simple solutions are preferred to ensure that

1656-450: The input list. If the space required to store the input numbers is not counted, it has a space requirement of ⁠ O ( 1 ) {\displaystyle O(1)} ⁠ , otherwise ⁠ O ( n ) {\displaystyle O(n)} ⁠ is required. Different algorithms may complete the same task with a different set of instructions in less or more time, space, or ' effort ' than others. For example,

1702-490: The invention of the digital adding device by George Stibitz in 1937. While working in Bell Laboratories, he observed the "burdensome" use of mechanical calculators with gears. "He went home one evening in 1937 intending to test his idea... When the tinkering was over, Stibitz had constructed a binary adding device". In 1928, a partial formalization of the modern concept of algorithms began with attempts to solve

1748-429: The mid-19th century. Lovelace designed the first algorithm intended for processing on a computer, Babbage's analytical engine, which is the first device considered a real Turing-complete computer instead of just a calculator . Although a full implementation of Babbage's second device was not realized for decades after her lifetime, Lovelace has been called "history's first programmer". Bell and Newell (1971) write that

1794-627: The most important aspects of algorithm design is resource (run-time, memory usage) efficiency; the big O notation is used to describe e.g., an algorithm's run-time growth as the size of its input increases. Per the Church–Turing thesis , any algorithm can be computed by any Turing complete model. Turing completeness only requires four instruction types—conditional GOTO, unconditional GOTO, assignment, HALT. However, Kemeny and Kurtz observe that, while "undisciplined" use of unconditional GOTOs and conditional IF-THEN GOTOs can result in " spaghetti code ",

1840-564: The phrase Dixit Algorismi , or "Thus spoke Al-Khwarizmi". Around 1230, the English word algorism is attested and then by Chaucer in 1391, English adopted the French term. In the 15th century, under the influence of the Greek word ἀριθμός ( arithmos , "number"; cf. "arithmetic"), the Latin word was altered to algorithmus . One informal definition is "a set of rules that precisely defines

1886-400: The primitive shapes are water-tight. This can be important for some manufacturing or engineering computation applications. By comparison, when creating geometry based upon boundary representations , additional topological data is required, or consistency checks must be performed to assure that the given boundary description specifies a valid solid object. A convenient property of CSG shapes

BRL-CAD - Misplaced Pages Continue

1932-409: The resulting model is easy to edit. Solving this problem is a challenge because of the large search space that has to be explored. It combines continuous parameters such as dimension and size of the primitive shapes, and discrete parameters such as the Boolean operators used to build the final CSG tree. Deductive methods solve this problem by building a set of half-spaces that describe the interior of

1978-463: The shape of the desired mesh. Algorithm In mathematics and computer science , an algorithm ( / ˈ æ l ɡ ə r ɪ ð əm / ) is a finite sequence of mathematically rigorous instructions, typically used to solve a class of specific problems or to perform a computation . Algorithms are used as specifications for performing calculations and data processing . More advanced algorithms can use conditionals to divert

2024-675: The time and place of significant astronomical events. Algorithms for arithmetic are also found in ancient Egyptian mathematics , dating back to the Rhind Mathematical Papyrus c.  1550 BC . Algorithms were later used in ancient Hellenistic mathematics . Two examples are the Sieve of Eratosthenes , which was described in the Introduction to Arithmetic by Nicomachus , and the Euclidean algorithm , which

2070-449: Was deemed patentable. The patenting of software is controversial, and there are criticized patents involving algorithms, especially data compression algorithms, such as Unisys 's LZW patent . Additionally, some cryptographic algorithms have export restrictions (see export of cryptography ). Another way of classifying algorithms is by their design methodology or paradigm . Some common paradigms are: For optimization problems there

2116-692: Was first described in Euclid's Elements ( c.  300 BC ). Examples of ancient Indian mathematics included the Shulba Sutras , the Kerala School , and the Brāhmasphuṭasiddhānta . The first cryptographic algorithm for deciphering encrypted code was developed by Al-Kindi , a 9th-century Arab mathematician, in A Manuscript On Deciphering Cryptographic Messages . He gave the first description of cryptanalysis by frequency analysis ,

#296703