Let's assume you would have to design a 500 ml (about 1.1 pint) food/beverage container like a can and use the least amount of material. Here is a Python program that explains the steps to achieve this.

Member Avatar
Member Avatar
+2 forum 2

You can draw a number of shapes directly on the PyGame window, and then save the drawing to an image file.

Member Avatar
+3 forum 0

Dear all, Perhaps a bit of random one, but does anyone have an experience of using the surface fitting toolbox in MATLAB? My specific problem is that I have fitted a polynomial to a surface which is a good fit in this instance (r squared >0.99); fitting using interpolant will give a better fit on more complicated data, but how can I obtain the fitting parameters so that I can use the fit outside of MATLAB? Cheers.

Member Avatar
+0 forum 0

Hi! I have a problem with SDL and OpenGL. I wrote a code to convert SDL Surfaces to OpenGL textures. Now I have a function to Draw a rect(with opengl) on a SDL_Surface. That's the code to draw a rect: [CODE] void DrawRect(SDL_Rect *rect, GLuint texture) { float x = rect->x; float y = rect->y; float w = rect->w; float h = rect->h; // Bind the texture to which subsequent calls refer to glBindTexture( GL_TEXTURE_2D, texture ); glBegin( GL_QUADS ); //Bottom-left vertex (corner) glTexCoord2i( 0, 0 ); glVertex3f( x, y+h, 0.0f ); //Bottom-right vertex (corner) glTexCoord2i( 1, 0 ); glVertex3f( …

Member Avatar
Member Avatar
+0 forum 2

Please help me with this bug. I have python 3.0 and I was using pygame and for some reason it isn't reconizing [CODE]windowSurface[/CODE] here Is the code Im having problems with and thanks in advance. [CODE]import pygame, sys, random from pygame.locals import * #*******************************************SETUPVAR************************************************** BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) ORANGE = (255,180,0) YELLOW=(230,230,0) def newscreen(): pygame.init() mainClock = pygame.time.Clock() windowSurface = pygame.display.set_mode((700,600), 0, 32) pygame.display.set_caption('Test') BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) …

Member Avatar
Member Avatar
+0 forum 2

Before I tell you about Bill Gates’ speech at CEO Summit 2008 today, I’d like to share one more story from my trip to Orlando for STAR EAST last week. And then I’ll tie the two together. In [my May 10 post](http://www.daniweb.com/blogs/entry2434.html) from the conference, I mentioned “Testing Dialogues—In the Executive Suite,” an extremely entertaining keynote speech by James Whittaker, a software architect at Microsoft. In part of his presentation was a [Microsoft video](http://www.istartedsomething.com/20080315/microsoft-future-personal-health-video/) shown at one of its employee meetings. It opens with a female runner that’s using a device to monitor her vitals as she jogs along a …

Member Avatar
Member Avatar
+0 forum 1

The End.