## Graph Theory

In mathematics, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects.

Any diagram of points and line segments connecting pairs of points is called a graph. The points are usually called vertices or nodes, and the line segments are called edges. More than one edge is allowed to connect the same pair of vertices to yield a set of multiple edges. One can also permit an edge connecting a vertex to itself via a loop. Edges can intersect, but the places where they cross are not considered vertices.

A graph that comes in just one piece is called connected. This means that it is always possible to travel from any one vertex to any other by traversing a sequence of edges.

The degree (or valence) of a vertex is the number of edges that meet at that vertex. Loops are counted twice. A graph is called complete if every vertex is connected to each and every other vertex by a single edge. For example, the complete graph on four vertices looks like a square with the two

## Maya Python Face Extrusion

Example 1

`import maya.cmds as cmds#create a polygonal sphere cmds.polySphere()#delete faces , from 160 to the end cmds.delete('pSphere1.f[160:]')#extrude all  remaining faces #extrusion distance 0.1# faces are pulled independently cmds.polyExtrudeFacet('pSphere1.f[:]',kft=False, ltz=.1)`

Example 2

import maya.cmds as cmds
cmds.polySphere()

# extrude one face 20 times
# for every extrusion we perform a rotation and a translation
for i in range(1,20):
if i%2 ==0:
cmds.polyExtrudeFacet(‘pSphere1.f[0]’,rx=60,ty=2)
else:
cmds.polyExtrudeFacet(‘pSphere1.f[0]’,rx=-60,ty=2)

Example 3

#create a polygonal sphere having 10 subdivisions on x , 10 on y and radius equal to 5
cmds.polySphere(n=’sfera’,sx=10,sy=10,r=5)
#find out the number of faces
nrFete=cmds.polyEvaluate(f=True)
#extrude the faces with an even number , pulling them independently
for i in range(1,nrFete):
if i%2 ==0:
cmds.polyExtrudeFacet(‘sfera.f[%d]’%i,ltz=2,kft=False)

## Maya Python polyPlanarProjection

Script Example 1 gb

#create a new blinn shader with a bitmap image
#Create a polygonal sphere
#select 100 faces and apply the planar projection to them
#apply the shader to all these faces

import maya.cmds as cmds
cmds.polySphere()
for i in range(100):
cmds.select(‘pSphere1.f[%d]’%i)

Continue reading “Maya Python polyPlanarProjection”

## Maya Python IF statement: Coloring Faces

import maya.cmds as cmds
cmds.polyTorus() #create a polygonal torus
facesnr=cmds.polyEvaluate(f=True) #find out the number of torus faces

` for i in range(facesnr):   box1=cmds.xform('pTorus1.f[%d]'%i,q=1,bb=1)   if box1[1]>.2:      cmds.select('pTorus1.f[%d]'%i)      cmds.hyperShade(assign='blinn1')`
Continue reading “Maya Python IF statement: Coloring Faces”

## Maya Python Animation setKeyframe

In this example we’ll be looking at how to create keyframes with code. The script will animate a lot of small cubes placed on a sphere. We need 3 blinn shaders. First we create a sphere with default parameters.Then we create 250 small cubes. We use variable col1 for changing the cube color. pointPosition helps us getting the coordinates of the sphere vertices. We place the cubes on these positions and lastly we animate the cubes sizes, setting two keyframes.

Run the script and trigger playback.

Continue reading “Maya Python Animation setKeyframe”

## ANIMAL ISLAND Aila Sit & Play Virtual Early Preschool Learning System for Toddlers

• Animal Island Learning Adventure (AILA) Original Series for toddlers (12+ months) – high-quality educational content developed by educators and innovators for early learning when it matters the most. Itâ€™s hands-free, worry-free, ad-free and subscription-free with automatic updates. There are three play modes with curated playlists: broadcast for exposure, session for learning and lullaby for sleepy babies.
Continue reading “ANIMAL ISLAND Aila Sit & Play Virtual Early Preschool Learning System for Toddlers”