En curso

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 :)



Habilidades: Programación en C, Programación en C++, Gráficos generados por ordenador, Swift

Ver más: 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

Información del empleador:
( 134 comentarios ) Bonita Springs, United States

Nº del proyecto: #9198218

Adjudicado a:


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 en 1 día
(1319 comentarios)

14 freelancers están ofertando el promedio de $31 para este trabajo


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++ Más

$55 USD en 3 días
(110 comentarios)

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 Más

$50 USD en 2 días
(126 comentarios)

La propuesta todavía no ha sido proveída

$30 USD en 3 días
(5 comentarios)

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 Más

$15 USD en 1 día
(4 comentarios)

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# Más

$45 USD en 1 día
(11 comentarios)

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 en 1 día
(4 comentarios)

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

$35 USD en 1 día
(2 comentarios)

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 Más

$25 USD en 1 día
(2 comentarios)

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 en 3 días
(0 comentarios)

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 en 1 día
(0 comentarios)

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

$35 USD en 2 días
(0 comentarios)

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 en 1 día
(0 comentarios)

A proposal has not yet been provided

$25 USD en 1 día
(0 comentarios)