This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BoundingSphere bounds = new BoundingSphere(new Point3d(), Math.MAX_DOUBLE) // | |
Background backg = new Background (c) | |
backg.setApplicationBounds (bounds) | |
scene.addChild (backg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextumlParser.start_return r = parser.start(); | |
if (!parser.messages.isEmpty ()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@header { | |
import java.util.Vector; | |
} | |
@members { | |
private Vector <Configuracion> configuraciones = new Vector (); | |
private Vector <Geometria> geometrias = new Vector (); | |
//Aqui tambien puedes declarar funciones | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='rtMatcher'><a href='http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=WILWros&artist=MGMT&song=Kids' target='_blank'><img src='http://images.wikia.com/lyricwiki/images/phone_left.gif' alt='phone' width='16' height='17'/></a> <a href='http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=WILWros&artist=MGMT&song=Kids' target='_blank'>Send "Kids" Ringtone to your Cell</a> <a href='http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=WILWros&artist=MGMT&song=Kids' target='_blank'><img src='http://images.wikia.com/lyricwiki/images/phone_right.gif' alt='phone' width='16' height='17'/></a></div>You were a child | |
Crawling on your knees toward it | |
Making Mama so proud | |
But your voice was too loud | |
We liked to watch you laughing | |
You picked the insects off plants | |
No time to think of consequences | |
Control yourself | |
Take only what you need from it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Ray( origin:Point3d, direction:Vector3d ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Image { | |
int width; | |
int height; | |
Point3i [][] image = null; | |
public Image(int width, int height) { | |
this.width = width; | |
this.height = height; | |
image = new Point3i[width][height]; | |
for (int i = 0; i < width; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Image { | |
int width; | |
int height; | |
Point3i [][] image = null; | |
public Image(int width, int height) { | |
this.width = width; | |
this.height = height; | |
image = new Point3i[width][height]; | |
for (int i = 0; i < width; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed case class Sphere (center:Vector3d , radius: Double) extends Geometry | |
{ | |
def intersect (r:Ray, h:Hit, range:Range,material:Color3f): Option [(Hit,Range)]= | |
{ | |
var v = new Vector3d ( r.origin.x - center.x , r.origin.y - center.y,r.origin.z - center.z); | |
var discriminant = pow (v.dot (r.direction),2.0) - (pow (v.dot(v),2) - pow (radius,2)); | |
if (discriminant >= 0 ) | |
{ | |
//var t1 = -(v.dot(r.direction)) + sqrt (discriminant); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qs (x:xs) = filter (\x -> x < xs) xs ++ x ++ (filter (\x -> x > xs)) | |
Point Free | |
qs = ap (liftM2 (++) (filter =<< flip (<)) . (. (filter . flip (>))) . (++) . head) tail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perm :: MonadPlus m => [a] -> m [a] | |
perm [] = return [] | |
perm (x:xs) = do ys <- perm xs | |
zs <- insert x ys | |
return zs | |
insert :: MonadPlus m => a -> [a] -> m [a] | |
insert x xs = (return (x:xs)) | |
`mplus` case xs of | |
[] -> mzero |