Final Portfolio NANO 230 Scott Mason 6/9/13 Nano-characterization Final Portfolio NANO 230 Scott Mason 6/9/13 Scott Mason Spring 2013 Nano-characterization Final Portfolio NANO 230 Scott Mason 6/9/13 SCOTT MASON Qzzxt4@gmail.com/(719)331-9013 EDUCATION North Seattle Community College, Seattle, WA Certificate in Nanotechnology (Sep. 2012-Current) University of Washington, Seattle, WA B.S. in Biochemistry (Aug. 2005-Jun. 2009) GPA 3.14 (Dean’s List: Fall 2005, Fall 2006) TECHNICAL SKILLS Animal models: Intraperitoneal hormone injection; Maintain mouse colony Cell Biology: RNA and DNA FISH (fluorescence in situ hybridization); Transformation (E.coli and S.cerevisiae); Making chemically competent cells DNA: PCR; PCR primer design; Restriction enzyme digestion; Ligation; Gel electrophoresis; Subcloning; DNA sequencing Mammalian cell culture: Mouse bone marrow extraction; Transfection; culturing: 293T, 293F, BJAB, Mono Mac 6, Thp-1, WeHi, 3T3, B-cells Material techniques: Salinize glass with aminosilane; UV spectroscopy; Limited experience with Instron Micro-fabrication: Spin coating; Lithography; Thermal evaporation; Vacuum systems; Class 10k clean room; PDMS microfluidics chambers Microscopy: Light; Phase; Fluorescence; Live-cell; Limited experience with Scanning Electron, Confocal, and Atomic Force microscopes Protein analysis: SDS-Page; Western blot; Silver stain; Luciferase assay; FACs; Mass spectroscopy; Coimmunoprecipitation; Tandem affinity purification COMPUTER SKILLS Computer experience: Mac; PC; Photoshop; Microsoft Office; VectorNTI Programming experience: Smoldyn; Limited experience with Bash, Python, HTML, and CSS Website experience: Wordpress TRAINING Equipment: NanoDrop; Nikon Compound Fluorescence Microscope; Limited experience with Aspex Scanning Electron Microscope and Fluoveiw Confocal Microscope Lab: Radiation safety; Mouse work; Blood-borne pathogens; Familiar with MSDS and SOPs ACADEMIC EXPERIENCE North Seattle Community College (NSCC) Independent research and class projects (Sept. 2012-Aug. 2013) Developed a program to convert images from Scanning Electron and Atomic Force microscopes into 3D printer format to create easily visualized educational materials Created an optical sensor using nanolithography techniques Produced microfluidics chambers using nanolithography Final Portfolio NANO 230 Scott Mason 6/9/13 International Genetically Engineered Machines competition (iGEM) Undergraduate researcher (Jun.-Nov. 2008) Worked on creating a system of bacterial plasmids to control bacteria-yeast conjugation resulting in successful transfer of DNA from bacteria to yeast Educated team members in basic lab techniques improving overall project success ACHIEVEMENTS AND AWARDS Phi Theta Kappa (North Seattle Community College) National Society of Collegiate Scholars (University of Washington, 2006-present) PROFESSIONAL EXPERIENCE University of Washington (UW): Ailion Lab [Start-up lab: began Sept. 2011] Research Scientist/Engineer I (Dec. 2011-Sept. 2012); General Lab Manager (Dec. 2011-Sept. 2012) Developed, catalogued, stocked, and maintained database of frozen biological samples resulting in successful implementation of lab sample storage system Envisioned and created lab website with Wordpress Purchased, organized, and inventoried laboratory chemicals, buffers, and other supplies for orders under $500 Assisted principal investigator in organizing purchasing orders over $500 Collaborated with supervisor to design and perform experiments in order to advance scientific understanding and aid in the ability to acquire future funding Understood and enforced university policy on lab waste disposal, proper chemical storage, and proper safety protocols Learned C. elegans culturing techniques to assist in scientific research Critiqued scientific papers in a group in order to better understand current research and get ideas for future project directions. Fred Hutchinson Cancer Research Center (FHCRC): Groudine Lab Research Technician I (Nov. 2009-Oct. 2011) Designed and tested protein expression from DNA vectors for visualization in in vivo and in vitro mammalian cell expression systems allowing for successful imaging of protein localization Bonded antibodies to glass using aminosilane and glutathione conjugation to successfully capture cells on glass surface Assisted supervisor with purchasing and inventorying lab expenses under $500 Performed 4 color live and fixed cell fluorescence microscopy to analyze protein and DNA localization Prepared fixed cells via DNA and RNA FISH to obtain high resolution images of intranuclear colocalization and obtained high quality data of c-Myc and IgH localization Extended a computer simulation that models nuclear protein dynamics to help direct wetlab research Conceptualized new research projects to validate computer simulations opening up new avenues of research Developed a robust and efficient way to collect data from a sample size exceeding 1000 data points in a fast, reproducible manner with data output 100 times faster than previous method Helped maintain mouse colony; changed bedding, fed, and injected hormones for mating Final Portfolio NANO 230 Scott Mason 6/9/13 Viral Logic Systems Technology (VLST) Lab Assistant / Proteomics and Informatics (Oct. 2005-Oct. 2009) Developed gadgets to improve high throughput laboratory techniques resulting in a 15% decrease in product production time Led research in creating a DNA vector to screen non-classically secreted proteins used a dualluciferase/SEAP-luciferase reporter assay Constructed and tested expression plasmids for viral proteins for use in downstream processed Implemented, arranged, validated, and managed DNA stocks generated by the Proteomics and Informatics group in the company-wide DNA database leading to efficient company-wide DNA distribution Maintained mammalian cell cultures for transfections and assays creating a stock for my research group Supported senior lab personnel by helping with experiments on an as needed basis Trained new hires in basic lab work and lab protocols Organized, stocked, monitored, and inventoried lab supplies and chemicals Logged tasks performed and hours worked to communicate accomplished tasks to management Final Portfolio NANO 230 AFM 1. A picture of our AFM with the manufacture name and model number Scott Mason 6/9/13 Final Portfolio NANO 230 Scott Mason 6/9/13 2. A short description of the instrument specifications [1] Measurement channels 16 bit A/D converters, up to seven signals depending on configuration Scan generator 16 bit D/A converter for all axes Scan speed Up to 60ms / line at 128 datapoints / line Scan area and data points Individual width / height, up to 2048 x 2048 points Scan image rotation 0° - 360° Sample tilt compensation Hardware X/Y-slope compensation Spectroscopy modes Single point measurements or multiple measurements along a vector Spectroscopy measurement averaging 1-255 Spectroscopy data points Up to 2048 AFM Scan Head: 110µm Maximum Scan range 1) 110 µm Maximum Z-range 1) 22 µm Drive resolution Z 2) 0.34 nm Drive resolution XY 2) 1.7 nm XY-Linearity Mean Error < 0.6% Z measurement noise level (RMS, Static Mode) 0.4 nm (max. 0.55 nm) Z measurement noise level (RMS, Dynamic Mode) 0.3 nm (max. 0.55 nm) 3. A diagram showing the labeled parts of an AFM Final Portfolio NANO 230 Scott Mason 6/9/13 4. A short description, numbered list, or bulleted list detailing how an AFM works In tapping mode: Cantilever with a sharp tip resonates near the surface of a sample, lightly tapping the surface Laser is reflected off the back of the cantilever to a photodetector Cantilever is rastered across the surface of the sample and the position of the reflected laser is recorded Changes in the position of the reflected laser light are caused by changes in the oscillation of the cantilever and this is correlated to changes in the height of the sample 5. One AFM image labeled and with a scale bar and z-scale from one of our standard samples 6. One additional AFM image of a standard sample or a sample of your choosing labeled and with a scale bar and z-scale Final Portfolio NANO 230 Scott Mason 6/9/13 7. Optional: SEM image of an AFM cantilever and tip including label and scalebar. Works Cited 1. Nanoscience Instruments, Inc. "The Nanosurf® EasyScan 2 AFM Specifications." EasyScan 2 AFM Specifications. Nanoscience Instruments, Inc., 2012. Web. 25 Apr. 2013. <http://www.nanoscience.com/products/easyScan2/easyScan2AFM_specs.html>. 2. Murray, Richard M. "Atomic Force Microscope." - FBSwiki. Caltech, n.d. Web. 25 Apr. 2013. <http://www.cds.caltech.edu/~murray/amwiki/index.php/Atomic_force_microscope>. Final Portfolio NANO 230 Scott Mason 6/9/13 SEM 1. A picture of our SEM with the manufacture name and model number Aspex – Explorer Guaranteed Performance** Particle Detection Efficiency Greater than 95% Particle Sizing Precision 0.25 microns or better Particle Sizing Accuracy 0.5 microns or better Occurrence of False Positives Less than 1 per mm2 Particles Sized per Hour Up to 33,000 Final Portfolio NANO 230 Scott Mason 6/9/13 Particles Sized per Hour Up to 10,000 **Performance as measured using the Performance Grading System™ for features 1 to 100 μm. Performance Specifications Particle Detection Range 30nm to 5mm Detectors SED, Quad BSED, SDD EDX Accelerating Voltage 0.2 to 25 KeV Continuous Stage Movement 80mm x 100mm Lightest Element Detection Boron EDX Resolution 135 eV Sizing Algorithms Available RCA and CFA FDA Compliance Level cGMP Data Security 21 CFR part 11 Compliant* Stage Motorization 80mm x 100mm XY, Manual Z Chamber Dimensions 180mm x 230mm x 140mm Final Portfolio NANO 230 Scott Mason 6/9/13 2. A diagram showing the labeled parts of an SEM used for imaging and EDS analysis a short description, numbered list, or bulleted list detailing how an SEM works A Tungsten filament is heated to eject electrons Ejected electrons are focused using electromagnetic coils The electrons interact with the sample in one of three ways[2,3] o The sample can eject low energy electrons from surface electron orbitals leaving a low energy vacancy for another electron to fill. This causes high-energy wavelengths to be emitted from the sample. o They can bump electrons in the material to higher orbital energy levels; the electrons then fall back to a lower energy orbital and release characteristic X-rays (EDX). o They can interact directly with the nucleus of an atom in the material and be scattered in any direction. This results in backscattered electrons. [1] 4 Images Final Portfolio NANO 230 -1 SEM image labeled and with a scale bar from one of our standard samples -2 SEM images labeled and with scale bars from samples of your choosing Scott Mason 6/9/13 Final Portfolio NANO 230 Scott Mason 6/9/13 -A macro picture of a sample used for EDS, the EDS spectra with KLM markers and the elemental composition 6600 × 10 µm Counts 1,500 1,000 500 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 keV Works Cited 1. Bahadorimehr, Alireza. "SEM, FESEM." Blogspot.com, 12 July 2010. Web. 09 May 2013. <http://bahadorimehr.blogspot.com/2010/07/sem-fesem.html>. 2. Wittke, James H. "[SEM] Types of Signals." [SEM] Signals. Northern Arizona University, 2008. Web. 24 Apr. 2013. <http://www4.nau.edu/microanalysis/MicroprobeSEM/Signals.html>. 3. Versluijs, Marjan. "Inorganic Chemistry UU - Research: Programme Design." Inorganic Chemistry UU - Research: Programme Design. Utrecht University, n.d. Web. 24 Apr. 2013. <http://www.anorg.chem.uu.nl/people/staff/MarjanVersluijsHelder/home.htm>. Final Portfolio NANO 230 Scott Mason 6/9/13 Profilometer 1. A picture of our profilometer with the manufacture name and model number Bruker - DektakXT a short description of the instrument specifications Measurement Technique Stylus profilometry (contact measurement) Measurement Capability Two-dimensional surface profile measurements Stylus Force 1 to 15mg with LIS 3 sensor Stylus Options Stylus radius options from 50nm to 25μm Scan Length Range 55mm (2in.); 200mm (8in.) with scan stitching capability Data Points Per Scan 120,000 maximum Max. Sample Thickness 50mm (1.95in.) Step Height Repeatability <5Å, 1sigma on 0.1μm step Vertical Range 1mm (0.039in.) Vertical Resolution 1Å max. (@ 6.55-m range) Final Portfolio NANO 230 Scott Mason 6/9/13 Temperature Range Operating Range 20 and 25°C (68 to 77°F) 2. A diagram showing the labeled parts of an profilometer Deflection detector Stylus Cantilever [1] a short description, numbered list, or bulleted list detailing how a profilometer works A stylus attached to a cantilever is dragged across the surface of a sample with a constant contact force. On the other end of the cantilever is a permanent magnet inside a pair of solenoids. As the tip moves across the sample, vertical deflection is detected by measuring the change in current in two solenoids. Final Portfolio NANO 230 Images - 1 screen capture or replotted line scan showing a step height and a picture of the sample Scott Mason 6/9/13 Final Portfolio NANO 230 Scott Mason 6/9/13 - A one page study showing a process measured with the profilometer. It could be a measurement of sputter coated films, spin coated films, doctor blade films, graphite exfoliation, RMS surface roughness etc. The study needs to include a plot of data with labeled axis and error bars, thickness data, and a camera screen capture. A very short description needs to be included describing the study and the results. Profilometer data of the height of three different colors of PLA Blue White Yellow Final Portfolio NANO 230 Scott Mason 6/9/13 Average Surface Variation of Different Colored PLA 800 Average Variation 700 600 500 400 300 200 100 0 Blue White Yellow Color Works Cited 1. Lee, Dong-Hyeok, and Nahm-Gyoo Cho. "Assessment of Surface Profile Data Acquired by a Stylus Profilometer." Measurement Science and Technology 23.10 (2012): 105601. Print. Final Portfolio NANO 230 Scott Mason 6/9/13 Confocal 1. A picture of our confocal with the manufacture name and model number [1] 2. A short description of the instrument specifications (laser lines etc). FLUOVIEW FV10i SPECIFICATIONS FV10i-LIV Laser Light Source Detection Focus FV10i-DOC Ultraviolet/Visible light LD lasers 405nm (18mW), 473nm (12.5mW), 635nm (10mW), 559nm Modulation: Continuously variable by the LD direct modulation (0.1%-100%, 0.1% inclement) Line return period-laser OFF Detector module Fluorescence: 2 channels, Phase Contrast: 1 channel Variable barrier filter mechanism for fluorescence channel by diffraction grating and slit Detection method Analog integration detection by Photomultiplier Pinhole Single motorized pinhole. Pinhole diameter: ø50-800μm automatic setting (adjustable to ×1.0, ×1.5, ×2.0, and ×2.5) Field number 18 Optical zoom 10× objective: 1× – 6× in 0.1x increments 60× objective: 1× – 10× in 0.1x increments Automatic Exposure Automatic setting of the laser intensity and photomultiplier sensitivity to fluorescence intensity. Z-drive Motorized focus with minimum increment: 0.01μm Objectives Exclusively designed 10× phase contrast objective NA 0.4 (equivalent to UPLSAPO 10x) Exclusively designed 60× phase contrast water-immersion objective NA 1.2 (equivalent Exclusively designed 10× phase contrast objective NA 0.4 (equivalent to UPLSAPO 10x) Exclusively designed 60× phase contrast oilimmersion objective NA 1.35 (equivalent to Final Portfolio NANO 230 Scott Mason 6/9/13 to UPLSAPO 60× W) Remote switching from software by electric revolver UPLSAPO 60× O) Remote switching from software by electric revolver 3. A diagram showing the labeled parts of a laser scanning confocal microscope [2] 4. A short description, numbered list, or bulleted list detailing how a laser scanning confocal microscope works Laser light is reflected off a dichromatic mirror (A mirror that reflects only certain wavelengths of light, while allowing other wavelengths to pass through) The reflected light interacts with the sample causing fluorescence The emitted light travels back through the dichromatic mirror to a pinhole aperature where out of focus light is blocked and only in focus light is allowed to reach the photo detector. 5. 3 Confocal images labeled and with scale bars- at least one of the images must be a 3D rendering. You may include both a 2D and a 3D image of the same sample, but this only counts as one i Final Portfolio NANO 230 Scott Mason 6/9/13 Final Portfolio NANO 230 Scott Mason 6/9/13 Works Cited 1. "New FluoView FV10i Confocal Laser Scanning Microscope from Olympus." New FluoView FV10i Confocal Laser Scanning Microscope from Olympus. Nanowerk.com, 17 Nov. 2009. Web. 09 June 2013. 2. Rice, George. "Fluorescent Microscopy." Fluorescent Microscopy. Carleton College, 16 Mar. 2013. Web. 21 May 2013. <http://serc.carleton.edu/microbelife/research_methods/microscopy/fluromic.html>. Final Portfolio NANO 230 Scott Mason 6/9/13 ''' Created on Feb 24, 2013 @author: qzzxt ''' import linecache # The following block of code must be edited for each run to run properly filename = "Ultra High resolution" #The name of the text file created in processing filesuffix = "_3d rounding" #Suffix to provide a unique filename file will save in path listed in main code below as 'filename + filesuffix + .stl' dimX = 256 #The X-resolution of the picture dimY = 256 #The Y-resolution of the picture inverse = False #If True, black values become high points isflat = True #If False, creates a back-to-back mirror 3D image. If True, creates a flat plane with the 3D figure protruding out issmooth = True #If True, runs smoothing algorithm minheight = 5 #Determines the minimum height of the surface (Good starting value ~5) scale = 1/10 #Scales down the Z-heights so that there is less difference between the highs and lows (Good starting value ~'1/10') offset = -50 #Adds depth to the 3D figure (Should be negative with a good starting value ~50) slopethreshold = 50 #The maximum difference in height allowed for averaging (Lower values give sharper edges, higher values give smoother curves. Good starting value ~50) binning = 1 #determines the bin size (pixel distance) used for averaging. A value of 1 uses the 8 nearest neighbors. A value of 2 uses the 22 nearest pixels. class Surface_Draw(): #Creates the normal vectors for the two triangles that connect four points def calculatesurface(): normalize1 = 1 normalize2 = 1 A1 = ((y1-y3)*(z1-z2))-((z1-z3)*(y1-y2)) B1 = ((z1-z3)*(x1-x2))-((x1-x3)*(z1-z2)) C1 = ((x1-x3)*(y1-y2))-((y1-y3)*(x1-x2)) A2 = ((y2-y3)*(z2-z4))-((z2-z3)*(y2-y4)) B2 = ((z2-z3)*(x2-x4))-((x2-x3)*(z2-z4)) C2 = ((x2-x3)*(y2-y4))-((y2-y3)*(x2-x4)) if abs(A1) >= abs(B1) and abs(C1): normalize1 = A1 if abs(B1) >= abs(A1) and abs(C1): normalize1 = B1 Final Portfolio NANO 230 if abs(C1) >= abs(A1) and abs(B1): normalize1 = C1 if abs(A2) >= abs(B2) and abs(C2): normalize2 = A2 if abs(B2) >= abs(A2) and abs(C2): normalize2 = B2 if abs(C2) >= abs(A2) and abs(B2): normalize2 = C2 if normalize1 == 0: normalize1 = 1 if normalize2 == 0: normalize2 = 1 A1 = A1/normalize1 B1 = B1/normalize1 C1 = C1/normalize1 A2 = A2/normalize2 B2 = B2/normalize2 C2 = C2/normalize2 surfacenormal = [A1, B1, C1, A2, B2, C2] imagenormal.append(surfacenormal) #Writes the planes that make up the 3D surface def surfacedraw(wz1, wz2, wz3, wz4): filepath.write("facet normal " + str(A1) + " " + str(B1) + " " + str(C1) + "\n") filepath.write("outer loop \n") filepath.write("vertex " + str(x1) + " " + str(y1) + " " + str(wz1) + "\n") filepath.write("vertex " + str(x3) + " " + str(y3) + " " + str(wz3) + "\n") filepath.write("vertex " + str(x2) + " " + str(y2) + " " + str(wz2) + "\n") filepath.write("endloop \n") filepath.write("endfacet \n") filepath.write("facet normal " + str(A2) + " " + str(B2) + " " + str(C2) + "\n") filepath.write("outer loop \n") filepath.write("vertex " + str(x2) + " " + str(y2) + " " + str(wz2) + "\n") filepath.write("vertex " + str(x3) + " " + str(y3) + " " + str(wz3) + "\n") filepath.write("vertex " + str(x4) + " " + str(y4) + " " + str(wz4) + "\n") filepath.write("endloop \n") filepath.write("endfacet \n") #Writes the planes that create the sides of the 3D figure def sidedraw(A1, B1, q1, q2, r1, r2, s1, s2, s3, s4): filepath.write("facet normal " + str(A1) + " " + str(B1) + " 0\n") filepath.write("outer loop \n") filepath.write("vertex " + str(q1) + " " + str(r1) + " " + str(s1) + "\n") filepath.write("vertex " + str(q1) + " " + str(r1) + " " + str(s3) + "\n") filepath.write("vertex " + str(q2) + " " + str(r2) + " " + str(s2) + "\n") filepath.write("endloop \n") filepath.write("endfacet \n") filepath.write("facet normal " + str(A2) + " " + str(B2) + " 0\n") Scott Mason 6/9/13 Final Portfolio NANO 230 Scott Mason 6/9/13 filepath.write("outer loop \n") filepath.write("vertex " + str(q2) + " " + str(r2) + " " + str(s2) + "\n") filepath.write("vertex " + str(q1) + " " + str(r1) + " " + str(s3) + "\n") filepath.write("vertex " + str(q2) + " " + str(r2) + " " + str(s4) + "\n") filepath.write("endloop \n") filepath.write("endfacet \n") #Writes the planes that make up the bottom of the Flat surface def bottomdraw(x1, x2, y1, y2): filepath.write("facet normal 0 0 1\n") filepath.write("outer loop \n") filepath.write("vertex " + str(x1) + " " + str(y1) + " " + str(offset) + "\n") filepath.write("vertex " + str(x2) + " " + str(y2) + " " + str(offset) + "\n") filepath.write("vertex " + str(dimX/2) + " " + str(dimY/2) + " " + str(offset) + "\n") filepath.write("endloop \n") filepath.write("endfacet \n") class Image_Store(): #Reads the X, Y, and Z positions from the text file defined by the 'filename' variable #'minheight' determines the cutoff threashold for the lower end of the Z values def gatherposition(): inputstring1 = str(str(positionnum % dimX) + ";" + str(positionnum//dimX) + ";" + str(inputfile[positionnum])) inputsplit1 = inputstring1.split(';') x1 = float(inputsplit1[0]) y1 = float(inputsplit1[1]) if inverse: if float(inputsplit1[2]) <= minheight: z1 = minheight else: z1 = (256 - float(inputsplit1[2])) else: z1 = (float(inputsplit1[2])) if z1 <= minheight: currentposition = [x1, y1, z1, False, z1, avg, 0, values, height, templimit] else: currentposition = [x1, y1, z1, True, z1, avg, 0, values, height, templimit] imageposition.append(currentposition) #Smooths the image by averaging local values: #The 'binning' value determines how many pixels away the averaging function goes #The 'slopethreshold' determines how close the height values must be to be averaged (small values give sharper edges, large values give smother features) def heightsmooth(): if imageposition[positionnum][3]: binningX = -binning binningY = -binning while binningX <= binning: Final Portfolio NANO 230 Scott Mason 6/9/13 while binningY <= binning: if imageposition[positionnum][0] >= binningX and imageposition[positionnum][0] <= dimX - 2 - binningX: if imageposition[positionnum][1] >= binningY and imageposition[positionnum][1] <= dimY 2 - binningY: if abs(imageposition[positionnum][2] - imageposition[positionnum + dimX * binningY + 1 * binningX][2]) < slopethreshold: imageposition[positionnum + dimX * binningY + 1 * binningX][6] = 1 imageposition[positionnum][8] = imageposition[positionnum][8] + imageposition[positionnum + dimX * binningY + 1 * binningX][2] * imageposition[positionnum + dimX * binningY + 1 * binningX][6] imageposition[positionnum][7] = imageposition[positionnum][7] + 1 binningY = binningY + 1 binningY = -binning binningX = binningX + 1 imageposition[positionnum][5] = imageposition[positionnum][8]/imageposition[positionnum][7] imageposition[positionnum][4] = imageposition[positionnum][5] else: imageposition[positionnum][5] = 0 imageposition[positionnum][4] = 0 #Draws all necessary planes for a given set of four points def imagedraw(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, w1, w2, w3, w4): if isflat: if imageposition[positionnum][0] <= dimX - 2: Surface_Draw.surfacedraw(z1, z2, z3, z4) if imageposition[positionnum][1] <= 0: Surface_Draw.sidedraw(0, 1, x1, x2, y1, y2, z1, z2, w1, w2) Surface_Draw.bottomdraw(x1, x2, y1, y2) if imageposition[positionnum][0] <= 0: Surface_Draw.sidedraw(1, 0, x3, x1, y3, y1, z3, z1, w3, w1) Surface_Draw.bottomdraw(x3, x1, y3, y1) if imageposition[positionnum][1] >= dimY - 2: Surface_Draw.sidedraw(0, 1, x4, x3, y4, y3, z4, z3, w4, w3) Surface_Draw.bottomdraw(x4, x3, y4, y3) if imageposition[positionnum][0] >= dimX - 2: Surface_Draw.sidedraw(1, 0, x2, x4, y2, y4, z2, z4, w2, w4) Surface_Draw.bottomdraw(x2, x4, y2, y4) else: if imageposition[positionnum][3]: if imageposition[positionnum][0] <= dimX - 2: Surface_Draw.surfacedraw(z1, z2, z3, z4) Surface_Draw.surfacedraw(w1, w2, w3, w4) if imageposition[positionnum][0] <= dimX - 2: if not(imageposition[positionnum + 1][3]): Surface_Draw.sidedraw(1, 0, x2, x4, y2, y4, z2, z4, w2, w4) if imageposition[positionnum][1] <= dimY - 2: if not(imageposition[positionnum + dimX][3]): Final Portfolio NANO 230 Scott Mason 6/9/13 Surface_Draw.sidedraw(0, 1, x4, x3, y4, y3, z4, z3, w4, w3) if imageposition[positionnum][0] != 0: if not(imageposition[positionnum - 1][3]): Surface_Draw.sidedraw(1, 0, x3, x1, y3, y1, z3, z1, w3, w1) if imageposition[positionnum][1] != 0: if not(imageposition[positionnum - dimX][3]): Surface_Draw.sidedraw(0, 1, x1, x2, y1, y2, z1, z2, w1, w2) if imageposition[positionnum][1] <= 0: Surface_Draw.sidedraw(0, 1, x1, x2, y1, y2, z1, z2, w1, w2) if imageposition[positionnum][0] <= 0: Surface_Draw.sidedraw(1, 0, x3, x1, y3, y1, z3, z1, w3, w1) if imageposition[positionnum][1] >= dimY - 2: Surface_Draw.sidedraw(0, 1, x4, x3, y4, y3, z4, z3, w4, w3) if imageposition[positionnum][0] >= dimX - 2: Surface_Draw.sidedraw(1, 0, x2, x4, y2, y4, z2, z4, w2, w4) #The main program that calls the above functions if __name__ == '__main__': filepath = open('C:\\Users\\qzzxt\\North Seattle Community College\\Nano Lab\\image converter\\' + filename + filesuffix + '.stl', 'w') #The filepath that determines where the file is saved inputfile = linecache.getlines('C:\\Users\\qzzxt\\North Seattle Community College\\Nano Lab\\\image converter\\Pixel_converter\\' + filename + '.txt') #The filepath for the input text file from Processing filepath.write("solid " + filename + "\n") #Initializes the .stl file imagenormal = [] #Initializes the variable for use later imageposition = [] #Initializes the variable for use later positionnum = 0 #Initializes the variable for use later currentmax = 0 #Initializes the variable for use later templimit = 0 #Initializes the variable for use later slope = 0 #Initializes the variable for use later height = 0 #Initializes the variable for use later values = 1 #Initializes the variable for use later avg = 0 #Initializes the variable for use later while positionnum < dimX * dimY: Image_Store.gatherposition() positionnum = positionnum + 1 positionnum = 0 if issmooth: while positionnum < dimX * dimY: Image_Store.heightsmooth() positionnum = positionnum + 1 positionnum = 0 while positionnum < dimX * dimY - dimX - 1: x1 = q1 = imageposition[positionnum][0] x2 = q2 = imageposition[positionnum + 1][0] x3 = imageposition[positionnum + dimX][0] Final Portfolio NANO 230 x4 = imageposition[positionnum + 1 + dimX][0] y1 = r1 = imageposition[positionnum][1] y2 = r2 = imageposition[positionnum + 1][1] y3 = imageposition[positionnum + dimX][1] y4 = imageposition[positionnum + 1 + dimX][1] w1 = z1 = minheight * scale w2 = z2 = minheight * scale w3 = z3 = minheight * scale w4 = z4 = minheight * scale if imageposition[positionnum][3]: wz1 = z1 = s1 = imageposition[positionnum][4] * scale if imageposition[positionnum + 1][3]: wz2 = z2 = s2 = imageposition[positionnum + 1][4] * scale if imageposition[positionnum + dimX][3]: wz3 = z3 = s3 = imageposition[positionnum + dimX][4] * scale if imageposition[positionnum + dimX + 1][3]: wz4 = z4 = s4 = imageposition[positionnum + 1 + dimX][4] * scale if isflat: if z1 < minheight: wz1 = z1 = s1 = minheight if z2 < minheight: wz2 = z2 = s2 = minheight if z3 < minheight: wz3 = z3 = s3 = minheight if z4 < minheight: wz4 = z4 = s4 = minheight if imageposition[positionnum][3]: w1 = s1 = float(offset) - (float(z1)) w2 = s2 = float(offset) - (float(z2)) w3 = s3 = float(offset) - (float(z3)) w4 = s4 = float(offset) - (float(z4)) if isflat: w1 = s1 = float(offset) w2 = s2 = float(offset) w3 = s3 = float(offset) w4 = s4 = float(offset) Surface_Draw.calculatesurface() A1 = imagenormal[positionnum][0] B1 = imagenormal[positionnum][1] C1 = imagenormal[positionnum][2] A2 = imagenormal[positionnum][3] B2 = imagenormal[positionnum][4] C2 = imagenormal[positionnum][5] Image_Store.imagedraw(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, w1, w2, w3, w4) positionnum = positionnum + 1 Scott Mason 6/9/13 Final Portfolio NANO 230 filepath.write(("endsolid").format("a")) print("End") Scott Mason 6/9/13