Question
C# Help: The file contains a target box lower left coordinate, target box size, and information describing a line in parametric form. Using this information,
C# Help:
The file contains a target box lower left coordinate, target box size, and information describing a line in parametric form. Using this information, you will plot the line using character output (Such as "*").
The files are formatted as follows: llx, lly, d, p1, p2, v1, v2
Where, (llx, lly) are the lower-left coordinates of the target box, d is the size of the coordinate box (in both coordinates), p1, p2 are a point on the line, and v1, v2 are the vector on the line.
The line that is given through this information is:
This is the example they give in the description (the file name is "lineOne.txt"): "-10 -5 20 1 1 2 -2". This means the target box's lower-left coordinates are (-10,-5) the size of the target box is 20 and the line is:
Your task is to create the target box and the implicit form of the line. You can do this graphically or you can print the points using characters. An example of using characters might be (for a different line).
Here is what I have so far:
using System; using System.IO;
namespace CSC2300Lines_cBowman { class Program { static void Main(string[] args) { string lineOne;
using (StreamReader srLineOne= new StreamReader("LineOne.txt")) { lineOne = srLineOne.ReadLine(); } } } }
I just have no idea how to turn the file that I read into a target box and then have a line that goes through it. Any help on how to code this would be much appreciated. Thank you in advance!!
1(t) = +t 1(t) = +tStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started