Question: Python: Follow the sample code for generating a roof with the code below, write code to generate 2,000 random 3D points on the surface of

Python: Follow the sample code for generating a roof with the code below, write code to generate 2,000 random 3D points on the surface of a dining table which is 1.2 m tall, 1.5 m wide, and 3.6 m long. (code will be used in ArcScene to look at 3D points)

This Python program generates two text files for:

(1) LiDAR points for ground and vegetation over a topographic # slope defined by equation z = 1 - x^2 (slope.txt).

(2) LiDAR points on a gable roof defined by z = 1 + x (left side) # and z = 1 - x (right side) (roof.txt)

Python: Follow the sample code for generating a roof with the code

import random outfilel = open (r"c:\temp\4590\Shapes\slope.txt", "w") outfile2 = open(r"c:\temp\4590\Shapes oof.txt", "W") outfilel.write("ID, X, Y, Z" + " ") outfile2.write("ID, X, Y, Z" + " ") # (1) LiDAR points for ground and vegetation over a topographic slope # i = 0 while i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!