Python
Python is a high-level programming language, object-oriented, suitable, among other uses, to develop distributed applications, scripting, numeric computing and system testing. Python is often compared to Tcl, Perl, Java, JavaScript, Visual Basic or Scheme.  (Go to ufficial site)
Used modules
For this project are been used two particular module:
Python Model
The python model was developed by transforming the javascript code in python code, in particular the definition of functions and variables.
The model was developed by transforming the javascript code in python code, in particular the definition of functions and variables. It is recalled that while in javascript coordinates of translation and rotation start at 0, in pyplasm the coordinates starting from 1, with x = 1, y = 2, z = 3; mappings with Bezier curves ranging from S1 to S3 and not more from S0 to S2.
The NUBS (Non Uniform BSpline) of Javascript have been sostitute with BEZIER (S1) and the draw with view.
Worksurface platforms
To create th worksurface platform,I used some fixed paramenter, like plane's widht and heigh, and some parameter function to make support's plane and the same plane. Can see the pseudo-code below. The heigh of plane is 0.20, while its widht is 6 and its depth is 2.70; for the support the heigh is 0.05 + 2, the width is 0.15 and depth is 2.70. The support's plane and plane is create by 4 function : CREATE_PTL(...) is used to return an array of curve to map and points; MAPC(...) take an array of curve that have been mapped in S2 with BEZIER function (the curve has mapped with the next one); while CREATE_PLANE and MAKE_LEG use the other two function in order to create plane and support's plane.
PROBLEM:
The more complex the platform was center_table: the problem lies in the fact that it is not possible to rotate an array of points on an axis that would return the new array of points, in qunato is possible to perform the rotation only with objects, but it remains impossible to map in S2,objects already mapped in S1.
SOLUTION:
The solution comes from the idea of having an array of points and not rotated objects. My need was to rotate around the Z axis, so a rotation matrix was applied (multiplied) to my vector of points.
def rotZ (arrayOfPoints,a):
result = [];
for point in arrayOfPoints:
x,y,z = point;
result.append([COS(a)*x+SIN(a)*y+0,-SIN(a)*x+COS(a)*y+0,0+0+1*z]);
return result;
As first curve is been taken the final curve of table_leg, while as end curve, the start curve of table_leg2. The point of the first curve has been rotated until to end curve.
Worksurface platforms in project are three:
l = 2.60;r = 0.2;h = 0.05;
//this are the point of curve
ptl = [[0,0,h],[l,0,h],[l+0.05,r/4,h],[l+0.1,r/2,h],[l+0.05,r,h],[l,r,h],[0,r,h]];
//returned array with BEZIER(S1) curve with ptl as controlpoints, center, end, and ptl
def create_ptl(l,r,h);
//create leg for worksurface platforms
def make_leg(l,r,h);
//args is array of curve(BEZIER(S1)) that must be mapped in S2
def mapC(args);
//return an object, the worksurface platforms
def create_plane(l,r,h);
x_plane = h*41;y_plane = l;z_plane = r;
new_heigh = h*40;new_prof = l/2;new_weigh = r-0.05;
// base is the right leg, build through function mapC([create_ptl(l,r,h),create_ptl(new_prof,new_weigh,new_heigh])
table_leg = STRUCT([make_leg(l,r,h),create_plane(y_plane,z_plane,x_plane),base,behind])
Integrated Storage Solutions
For the integrated storage are create two models that after are been translated. To achieve this target you have not added new features
The integrated storage are two:
- Integrated storage (table_leg3):
- Integrated storage (table_leg4):
Final model temporary
To complete the office structure,I have rotated the half model respect z-axis for PI (angle). Can see two screenshot:
Middle
The middle consists in CUBOID that are properly rotate and translate and in Cylinder, with center in (0,0,0)
Accessories
Accessories:
- Monitor
- Pen
- Pc
- Bedside
Final
Now we can see the final model's screenshot: