Tag Archives: subtract

Boolean modeling in Maya

In this tutorial, you will learn how to use boolean modeling in Maya to take an object and subtract, add or intersect the geometry of the object with another object.

There are three different boolean operations in Maya:

  • Union – this will merge both selected objects together and will remove any geometry between the two objects. The two objects will essentially become one object.
    merge
  • Difference – this will ‘subtract’ or take away the last selected object from the first selected object. What this means is that one object will be used to “take a bite out” of another object.
    difference
  • Intersection – this will keep the geometry between the two objects and remove the rest.
    intersection

To access the boolean modeling tools, make sure the Modeling menu set is being used first.

The Modeling menu set
The Modeling menu set

Now select both objects and click on Mesh > Booleans. You will be able to choose from the Union, Difference, and Intersection boolean operations.

The boolean operations menu.
The booleans menu.

Watch the video below to see how to use these boolean modeling tools.

Operators in JavaScript

In this tutorial, you will learn how to use a range of operators in JavaScript to assign values, modify variables and make calculations.

If you have created your own variables and assigned them each a value (such as a string or integer), then you will already be familiar with the assignment operator which is a single = (equals sign).

Operators include:

Addition +
Subtraction
Division /
Multiplication *
Modulus %
Equals =

You can view the video below to see how to use these operators and scroll down to see the sample code.

 

The code below shows how you can use a range of operators when working variable assignments and calculations.

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8"/>
 <title>JavaScript - Operators</title>
 <script type="text/javascript">
 var x = 5, y = 10; //variables can be initialised on one line, separated by commas
 var z = x + y; // this is how variables can be added
 
 z++ //this increases the z variable value by 1
 
 z-- //this decreases the z variable value by 1
 
 // operators include + (plus) - (minus) * (multiply) / (divide) and % (modulus) which returns the remainder from division
 
 x+=y; //this is an example of compound addition. It is the equivalent of x = x + y
 // variables can be added using the compound addition += , compound subtraction -= , compound multiplication *= or compound addition /=
 
 document.write(z); // now let's see what the z variable displays after these modifications.
 
 </script>
 
</head>
<body>
 
 
</body>
</html>

Next tutorial: Strings