Wednesday, June 6, 2012

Creating An Ellipsoid in a 3D Grapher

When creating an Ellipsoid in a 3D Grapher, whether it be online or Apple's Grapher that comes with Mac, or using a formula inside of a 3D graphics program such as Blenders Add Mesh Math Addon, use this formula.
X function is:   a(cos(u))*cos(v)
Y function is:   b(cos(u))*sin(v)
Z function is:   c(sin(u))

U min: -Pi/2
U max: Pi/2
V min: -Pi
V max: Pi
a = Some number or function greater than 0
same for b and c function, or some constant n.


  • a>b>c — tri-axial or (rarely) scalene ellipsoid;
  • a=b>c — oblate ellipsoid of revolution (oblate spheroid);
  • a=b<c — prolate ellipsoid of revolution (prolate spheroid);
  • a=b=c — the degenerate case of a sphere;

In Apple Grapher I used this:


The 3,2,2 after the [x,y,z] is where you would put the a,b,c if you like.

This took me all day to figure out.  You got it in 2 secs.  Use carefully with beer.

Thursday, November 3, 2011

Learning C - C Primer Plus

I thought I would post some chapter review programs from chapters I'm reading in C Primer by Stephen Prata. This won't mean anything to anyone unless they know C programming. I'm basically putting it here so others can learn from what I've done and partly because I think a computer program is beautiful. Sort of in an artistic way. The characters and code seem like a picture to me.

This C program converts Centimeters to Feet and Inches:

//*************************************************
#include <stdio.h>
#define CMPERFT 30.48

float cm,ft,in;

int main (void) {
printf("Enter a height in centimeters (<=0 to quite): ");
scanf("%f", &cm );

while (cm > 0) {
ft = cm/CMPERFT;
in = (ft - (int)ft) * 12; //You can't find a remainder of a float with modulus.So use Cast
printf("\n%0.2f cm = %d feet, %0.3f inches\n", cm, (int)ft ,in);
printf("Enter a height in centimeters (<=0 to quite): ");
scanf("%f", &cm );
}

return 0;
}


//************************************************

Thursday, October 27, 2011

Finally Cut Comcast Cable

Well, I finally got fed up with Comcast Cable TV's high prices and cut the cable.
Though they'll never know. I told them I was moving so I wouldn't incur any additional fees.
Soon I'll be placing an Antenna in the attic for those times when I want the TV to make some noise. But other than that, I'll get what I want off of the internet. I've had cable since 1985 when I got my fist apartment. They've made a fortune off of me if you think the average over those 26 years has been about $40 a month, that comes to about $12,480. That's a lot for TV that is paid for by commercials anyway.
So long Comcast, you suck.... have been sucking for 26 years....money out of my wallet.
No more, good riddens.


Saturday, August 13, 2011

invalid literal for int() with base 10:

So I'm learning Python programming in my spare time.
For two hours I was stuck on this simple error:
invalid literal for int() with base 10:

Turns out, if you input a string number like "4.0" and you want the integer of it,
you must first make the string a float, and then make the float an integer.
"4.0" > float("4.0") > int(4.0) is the path.

So
>>>int("4.0") #this will give you an error
>>>int(float("4.0")) #this will work and give you >>>4

The reason I think this is necessary is because Python wants you to verify that you
know you are converting a float to an integer. It doesn't want to assume you know that.


Monday, May 2, 2011

Obama Can Do No Right

I believe President Obama could single-handedly find a cure for cancer, and people would bash him for killing off an entire industry.
It's true, you know it's true.

Tuesday, May 18, 2010

onjoFilms lates video and editing project.

Video of Sarasota's Iconcept where Art Meets Fashion.
Editing on Final Cut Pro and shot with a Canon 7D.

Video Here

Wednesday, May 5, 2010

4 Things I've Learned About Republicans Lately

1) They will come up to you bashing Obama thinking you think like them just because you are white.
2) Obama is responsible for the oil leak and now the floods in Nashville.
3) When you joke with them that a solution to the oil leak is to 'bomb it', they think that is a great idea.
And 4) If they know you are an Obama supporter they will come up to you and ask, "Well, how are you liking your change now?" with a grin on their face like they just asked the killer question. Of course that smirk goes away when you answer, "Excellent, better than expected." They haven't thought past a response like that yet.