Sedang Disiapkan

Graphics function to calculate offset from line

I need a function that takes a set of points that makes up a line and an offset (+ or -) and returns a new set of points that are offset perpendicularly by the offset distance from the original set.

If the angle between the adjacent line segments is convex then a new segment should be added.

If concave then the intercept between the two new lines. If a short segment gets "reversed" in the new line then it should be removed. See the attached sketch.

The line is open - i.e. this is not a closed shape.

The number of points is 6 to 10.

Ideally I would like this done in Swift but any variety of c would be ok. C++, C, C Sharp, Objective C. Please specify which language you will use in your bid.

Something like the following:

class Line {

var points : [Point]

init( Points : [Point] ) {

points = Points


func GetPointsAtOffset( offset : Double) -> [Point] {

// Fill this in :)



Kemahiran: Pengaturcaraan C, Pengaturcaraan C++, Grafik Komputer, Swift

Lihat lagi: two line segments, sketch programming, segments and lines, point to segment distance, objective of c programming, number function, line segments and points, line segments and lines, lines and lines segments, line line segment, line and line segments, intercept of two lines, function number, distance to a line segment, distance point line segment, c to objective-c, c sharp programming language, convex programming, convex lines, convex line

Tentang Majikan:
( 134 ulasan ) Bonita Springs, United States

ID Projek: #9198218

Dianugerahkan kepada:


Hello. I have enough skill with mathematics and geometry in order to solve this task, I prefer to use C# or C++, or C. I think C is best choice, because it's compatible with C++ and Objective-C, as far as I know

$26 USD dalam sehari
(1319 Ulasan)

14 pekerja bebas membida secara purata $31 untuk pekerjaan ini


Hello ... I am expert in c++m thus, I will do it in c++ .... I have some questions about the problem. So, if you want I to do it, I will ask you. I have master and PhD in graphics computing, and 22 years working in C++ Lagi

$55 USD dalam 3 hari
(110 Ulasan)

I am very proficient in c, c++. I have 16 years c++ developing experience now, and I have worked for 6 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used Lagi

$50 USD dalam 2 hari
(126 Ulasan)

La propuesta todavía no ha sido proveída

$30 USD dalam 3 hari
(5 Ulasan)

Hello, I can do it in C, C++, C#, don't Swift. The coordinate must be double, float, long? for example in C: struct Point{ double x,y; }; struct Line{ int count; /* >=6 */ struct Point* points; /* p Lagi

$15 USD dalam sehari
(4 Ulasan)

Hello. How are you? I saw your description and attached files. I understood it and can do it well. I have done several project like this. I'm an expert in Data Structures and Algorithms. And I know Java ,C/C++,C# Lagi

$45 USD dalam sehari
(11 Ulasan)

I can easily implement this in C++ in less than a day. Please, have a look at my profile:I have experience with computer graphics.

$25 USD dalam sehari
(4 Ulasan)

It is an aspect of drawing WPF c# project.I can help you

$35 USD dalam sehari
(2 Ulasan)

I am a Computer Science and Mathematics graduate from the 1990s, and I have plenty of C programming experience, and also some recent Java experience. Although this project is certainly not trivial, I would be happy to Lagi

$25 USD dalam sehari
(2 Ulasan)

I'm a Magister in Applied Mathematics and I have a lot of experience working with C++, so I will be doing this project in that language. I will be perfect for this job.

$30 USD dalam 3 hari
(0 Ulasan)

A simple C++ task could handle it easily just need a chance . to get review to make profile strong just test me . that all i want to say /....

$15 USD dalam sehari
(0 Ulasan)

I will done it on C language ...........................................................................................................................................................................

$35 USD dalam 2 hari
(0 Ulasan)

We can provide a program written in Dev C++ that computes new lines and Point sets for an Offset line. The program uses Michael Main's graphics.h h file. An exe and cpp file are available.

$25 USD dalam sehari
(0 Ulasan)

A proposal has not yet been provided

$25 USD dalam sehari
(0 Ulasan)