Questions tagged [line-drawing]

55 questions
10
votes
2 answers

How to calculate the similarity of two line drawing images in swift

We need to compare two hand drawn images..these images are drawn on the sprite kit.we need to see whether these pictures are roughly match or not. For Example, if someone draws a smile pic, we need to check whether the redrawing smile pic is looks…
10
votes
2 answers

Line Drawing + Intersection of that line with self and also detect CCSprites inside that drawn Line

I am drawing the line using following code, it works just amazing, http://www.merowing.info/2012/04/drawing-smooth-lines-with-cocos2d-ios-inspired-by-paper/ Now I want to..... 1> Detect if the line Intersect with itself. 2) Detect if CCSprite is…
Anand
  • 1,129
  • 7
  • 29
5
votes
1 answer

what is meant by symmetric DDA?

I have read about DDA. But I just came across the term symmetric DDA. What is it ? How is it different from DDA ?
Y.E.P
  • 1,187
  • 6
  • 20
  • 40
4
votes
2 answers

How to control the timing of CSS3 animation

I'm working on the SVG line drawing animation as shown below. So what am I doing is animate the ear by using stroke-dasharray and continue with the dots. I managed to finish the ear drawing, but I don't know how to control the dots' timing.…
Evelyn
  • 656
  • 7
  • 29
3
votes
1 answer

How can I draw an "eye diagram"-like plot in pandas?

I have a bunch of similar curves, for example 1000 sine waves with slightly varying amplitude, frequency and phases, they look like as in this plot: In the above plot the color of each sine wave is from the standard pandas colormap; I would like to…
Alessandro Jacopson
  • 18,047
  • 15
  • 98
  • 153
3
votes
2 answers

Is there an error in the Bresenham's algorithm from Wikipedia?

Bresenham's algorithm is used to draw a line on a square grid as are pixels for example. The algorithm is partly based on the subdivision of the plane into 8 parts called octants. The trick is to use symmetries to generalize the algorithm…
Delgan
  • 18,571
  • 11
  • 90
  • 141
2
votes
1 answer

Open GL - ES 2.0 : Drawing a simple line

I have spent quite some time and effort trying to figure out how to draw a line in opneGL es on the iPhone. Here is my code myMagicVertices[0] = -0.5; myMagicVertices[1] = -0.5; myMagicVertices[2] = 2.0; myMagicVertices[3] = 2.0; …
Abhi
  • 399
  • 2
  • 7
  • 21
2
votes
1 answer

UIBezierPath() and DragGesture: Connecting points creating corners instead of curves

I'm using the UIBezierPath() and DragGesture in my iOS app to draw lines on a canvas. To achieve this, I collect the gesture points and add them to a path, which is an object of UIBezierPath. I then set a specific lineWidth and stroke the path in a…
2
votes
0 answers

Understanding modified version of Bresenham's algorithm?

I was recently reading a paper by Alois Zingl about rasterization algorithms. I didn't get very far before I totally lost understanding of the algorithm. From my research I believe this algorithm is some kind of version of Bresenham's line drawing…
James51332
  • 164
  • 11
2
votes
2 answers

how do you draw a line in a pixel array

I like to have maximum control over the screen, so I have to control every pixel, and that has some pros and cons. one con is that I don't really have the help from any built-in functions. so I have no idea how to draw a line. I've tried to make a…
e nerd
  • 29
  • 2
2
votes
1 answer

Draw a straight line on the screen in Cocos2d?

I am making a game in which you shoot a ball. I want there to be a line that follows your finger when you touch the screen (showing you the path the ball will travel). It needs to be straight, and also a little side question: Once the line is drawn,…
yourface1234
  • 49
  • 1
  • 7
2
votes
1 answer

3D Line Drawing with selected point

I am using matplotlib and I want to select point my 3D scatter graph and connect them with a line.I can read (X,Y,Z) values my but I can't find how can i connect with a line.Here is my code. Thanks in advance import numpy as np import…
Onur Altay
  • 69
  • 6
2
votes
0 answers

DDA Algorithm and Bresenham Algorithm

I have been studying DDA and Bresenham algorithms for line drawing and am curious about one thing.In both the algorithms,we consider a pixel grid to be of unit size and perform further steps.My question is if I change my grid size to say 0.5*0.5…
2
votes
2 answers

Understanding Bresenham's error accumulation part of the algorithm?

I'm having issues understanding how the error accumulation part works in Bresenham's line drawing algorithm. Say we have x1 and x2. Let's assume that x1 < x2, y1 < y2, and (x2 - x1) >= (y2 - y1) for simplicity: Let's start with the naive way of…
vexe
  • 5,433
  • 12
  • 52
  • 81
2
votes
1 answer

Trying to move an object in a matrix using line drawing algorithm

I'm trying to move an object in a matrix (an array with [x,y]) using a line drawing algorithm, to help you understand what I mean I'm trying to make an object move like this: But instead of going "in line" it goes like this: I opened another…
Shaked Dahan
  • 402
  • 5
  • 22
1
2 3 4