Search this-function-is-to-test-modeling-with-function-this-function-is-to-test-modeling-with-functionthis-function-is-to-test

This function is to test modeling with function this function is to test modeling with functionthis function is to test

 
 

Top Questions

1.Write a Slicer One of the key steps in processing an STL file for printing is slicing. STL files were written ...

s were written to make slicing a low memory task by storing each triangle at a single place. We already have code to do the following: A Generator that returns a triangle one at a time from an STL file (specifically an ASCII STL file). It Return the triangle as a list of 3D points (tuples), ignoring the normal. (from HW4) A function that takes a list of line segments, each line segment is a list of 2D points (tuples) and returns a single list of 2D points where the start of one segment is the end of another. ( from HW 3) A function that converts a list of 2D points to G-Code (lab 2) A function that writes GCode to a file To make a slicer you need to: Write a function that calculates the intersection of a triangle with a horizontal plane. The input of the function should be a list of 3D points (tuples). It should return a list of 3D points. See this website for hints on the mathematics http://geomalgorithms.com/a06-_intersect-2.html#Triangle-Plane (Links to an external site.) ( https://web.archive.org/web/20180706054857/http://geomalgorithms.com/a06-_intersect-2.html (Links to an external site.) ) Next you need to combine all of these different functions into a single workflow that takes in an STL file, a slicing height, print temperatures, movement speed , and extrusion speed and returns a G-code String which prints the walls of the STL file. It should have an outer iteration over slice heights of the STL, for each slice height, it should scan all triangles and make a list of the line segments that intersect the plane at that Z height. Then it should order those segments into a list of points. That list of points is then converted into gcode movement and extrusion commands. The entire system combines these slices with setup and shutdown Gcode for the ender 3 printer to make the print job. You may write to a file a layer at a time or at the end. Once the slicer is done: Run the previous function with a vase file such as one of the following files: https://www.thingiverse.com/thing:126567/files https://www.thingiverse.com/thing:42570/files https://www.thingiverse.com/thing:31722/files https://www.thingiverse.com/thing:2795194/files Submit your code as a Jupiter notebook with the .gcode in it and, and an image of your print.
View More

2.In this problem and the next one, we’re going to make a very simple spam checker program by just looking ...

ooking at how likely a given email is to be spam based on the words it contains. In particular, in this problem we’re going to count how often words are present in spam emails within some set of training data (which here means a set of emails that have already been marked as spam or not spam manually). We have already started to write a function spam_score(spam_file, not_file, word), which takes in two filenames, along with a target word (a lowercase string). Both filenames refer to text files which must be in the same directory as hw07.py (we’ve provided several such files in hw07files.zip). The text files contain one email per line (really just the subject line to keep things simple) - you can assume that these emails will be a series of words separated by spaces with no punctuation. The first file contains emails that have been identified as spam, the second contains emails that have been identified as not spam. Since you haven’t learned File I/O yet, we’ve provided code that opens the two files and puts the data into two lists of strings (where each element is one line - that is, one email). You then must complete the function, so that it returns the spam score for the target word. The spam score is an integer representing the total number of times the target word occurs across all the spam emails, minus the total number of times the word occurs in not-spam emails. Convert all words to lowercase before counting, to ensure capitalization does not throw off the count.
View More

3.Greetings. I need help asap when it comes to a computer science project that I have to get done soon. ...

. I'm really close to completing it and I'm really stuck on this one situation and I don't know how to solve it. So right now I'm making a guessing game and every time you play the program tells the user how many guesses it took for them to get the answer. And what I need to do is to make sure that I get and isolate the lowest amount of guess and put it into the statistics function so that way it can print out the lowest amount of guesses that I got. Right now it isn't working and I really don't know why as it seems to be mostly adding up all the guesses until the last few. Here's my code: #include #include #include #include void haiku(){ printf("Welcome to the game.\n"); printf("Guess a number within range.\n"); printf("Win cool prizes here.\n\n"); } int compare(int guessiso){ int lowestvalue=0; int biggervalue=0; if(guessisooperand){ printf("It's lower.\n"); count++; isolatedcount++; } else if(user0){ lowguess=compare(x); x=one_game(count); count=x; printf("Do you want to play again?\n"); scanf("%d",&usertwo); userthree=usertwo; gamecount++; } statistics(gamecount,x,lowguess); }
View More

4.I have a doubt about on whether it is possible to integrate logarithmic spirals to find the area of certain ...

certain objects. So in this case, I derived a log spiral equation in polar coordinates to model an spiral galaxy. I plan on finding the area as well as volume of the galaxy using the function which I have derived. So is there any way, I could integrate these spiral functions to find area?
View More

5.Question 1: What is a player’s « reaction function » in a Bertrand game ? Question 2: What is a subgame ...

subgame perfect Nash equilibrium? Question 3: In which situations should we need the mixed extension of a game? Question 4: Find, if any, all Nash equilibria of the following famous matrix game: L R U (2,0) (3,3) D (3,4) (1,2) Question 5: What is the difference between a separating equilibrium and a pooling equilibrium in Bayesian games? Question 6: Give another name for, if it exists, the intersection of the players’ best-response « functions » in a game? Question 7: assuming we only deal with pure strategies, the Prisoner’s Dilemma is a situation with: No Nash equilibrium One sub-optimal Nash equilibrium One sub-optimal dominant profile No dominant profile Question 8: If it exists, a pure Nash equilibrium is always a profile of dominant strategies: True False Question 9: All games have at least one pure strategy Nash equilibrium: True False Question 10: If a tree game has a backward induction equilibrium then it must also be a Nash equilibrium of all of its subgames: Tr 2/2 Question 11: The mixed Nash equilibrium payoffs are always strictly smaller than the pure Nash equilibrium payoffs: True False Question 12: Which of the following statements about dominant/dominated strategies is/are true? I. A dominant strategy dominates a dominated strategy in 2x2 games. II. A dominated strategy must be dominated by a dominant strategy in all games. III. A profile of dominant strategies must be a pure strategy Nash equilibrium. IV. A dominated strategy must be dominated by a dominant strategy in 2x2 games. I, II and IV only I, II and III only II and III only I and IV only I, III and IV only I and II only Question 13: A pure strategy Nash equilibrium is a special case of a mixed strategy Nash equilibrium: True False Question 14: Consider the following 2x2 matrix game: L R U (3,2) (2,4) D (-1,4) (4,3) The number of pure and mixed Nash equilibria in the above game is: 0 1 2 3 Exercise (corresponding to questions 15 to 20 below): assume a medical doctor (M) prescribes either drug A or drug B to a patient (P), who complies (C) or not (NC) with each of this treatment. In case of compliance, controlled by an authority in charge of health services quality, the physician is rewarded at a level of 1 for drug A and 2 for drug B. In case of noncompliance, the physician is « punished » at -1 level for non-compliance of the patient with drug A and at -2 level for non-compliance with drug B. As for the compliant patient, drug A should give him back 2 years of life saved and drug B, only 1 year of life saved. When noncompliant with drug A, the same patient wins 3 years of life (due to avoiding unexpected allergic shock for instance), and when non-compliant with drug B, the patient loses 3 years of life. Question 15: You will draw the corresponding matrix of the simultaneous doctor-patient game. Question 16: Find, if any, the profile(s) of dominant strategies of this game. Question 17: Find, if any, the pure strategy Nash equilibrium/equilibria of this game. Question 18: Find, if any, the mixed strategy Nash equilibrium/equilibria of this game. Questions 19 and 20: Now the doctor prescribes first, then the patient complies or not: draw the corresponding extensive-form game (= question 19) AND find the subgame perfect Nash equilibrium/equilibria (=
View More

6.Directions: You are part of a fireworks crew assembling a local fireworks display. There are two parts to the fireworks platforms: ...

rts to the fireworks platforms: one part is on the ground and the other part is on top of a building. You are going to graph all of your results on one coordinate plane. Make sure to label each graph with its equation. Use the following equations to assist with this assignment. • The function for objects dropped from a height where t is the time in seconds, h is the height in feet at time it t, and 0 h is the initial height is 2 0 ht t h ( ) 16 =− + . • The function for objects that are launched where t is the time in seconds, h is the height in feet at time t, 0 h is the initial height, and 0 v is the initial velocity in feet per second is 2 0 0 ht t vt h ( ) 16 =− + + . Select the link below to access centimeter grid paper for your portfolio. Centimeter Grid Paper Task 1 First, conduct some research to help you with later portions of this portfolio assessment. • Find a local building and estimate its height. How tall do you think the building is? • Use the Internet to find some initial velocities for different types of fireworks. What are some of the initial velocities that you found? Task 2 Respond to the following items. 1. While setting up a fireworks display, you have a tool at the top of the building and need to drop it to a coworker below. a. How long will it take the tool to fall to the ground? (Hint: use the first equation that you were given above, 2 0 ht t h ( ) 16 =− + . For the building’s height, use the height of the building that you estimated in Task 1.) b. Draw a graph that represents the path of this tool falling to the ground. Be sure to label your axes with a title and a scale. Your graph should show the height of the tool, h, after t seconds have passed. Label this line “Tool”.
View More

7.My project in classical physics course is to use MATLAB code to analyze chaos in double pendulum: My goal is ...

goal is to look to 1) at the fractal nature of the turnover time as a function of initial conditions such as https://en.wikipedia.org/wiki/Double_pendulum#Chaotic_motion. 2) calculating the Lyapunov exponent of the system by looking at separation times of very close initial conditions. Can you help me with this project? I have very limited knowledge on Matlab.
View More