Questions tagged [zigzag]

The term "zigzag", in graphic design, describes a line composed of small lines in which any pattern of two small lines have the same length and form equal angles relative to any other patterns in the zigzag. The term also is the name of an encoding system for integers.

Zigzag offers an attractive and mention-able separators in some design approaches. The first Zigzag widely drawn was made by ancient Egyptian in hieroglyph writings.

zigzag example which depicts water.

From "Signed Types" on Encoding - Protocol Buffers - Google Code:

ZigZag encoding maps signed integers to unsigned integers so that numbers with a small absolute value (for instance, -1) have a small varint encoded value too. It does this in a way that "zig-zags" back and forth through the positive and negative integers, so that -1 is encoded as 1, 1 is encoded as 2, -2 is encoded as 3, and so on

55 questions
1
vote
2 answers

generate an ordered zig-zag set of points (path) given bounds, direction, and starting point

say we want to generate a zig-zag set of points as a numpy array like the following image such that the array elements' order is similar to moving on the path: we are given: The bounds where this path should be in (e.g., the above image…
Alejandro
  • 879
  • 11
  • 27
1
vote
1 answer

Compute slope/derivative values of zigzag line

I would like to compute the slope/derivative of each zigzag line, and show them above/below the zigzag line. How to do this? Example of zigzag: //@version=4 study("ZigZagSlope", overlay = true, max_bars_back = 500, max_lines_count = 300) prd =…
User4536124
  • 37
  • 1
  • 11
1
vote
1 answer

Zig Zag when using geom_line with ggplot in R

I would really appreciate some insight on the zagging when using the following code in R: tbi_military %>% ggplot(aes(x = year, y = diagnosed, color = service)) + geom_line() + facet_wrap(vars(severity)) The dataset is comprised of 5 variables (3…
jgrabow1
  • 13
  • 2
1
vote
1 answer

Text edge zigzag effect removal (OR finding the dominant color for a image region)

My goal is to draw the text bounding boxes for the following image. Since the two regions are colored differently, so this should be easy. I just need to select the pixels that match a certain color values to filter out the other text region and run…
Zekun
  • 375
  • 5
  • 12
1
vote
0 answers

adding zigzag on y axis in ggplot inbetween two variables

I want to add a zigzag on the y-axis in ggplot in between to variables (one variable ranges between 25 and 35 and the other between 59 and 65). I tried to use break axis, but then I need to use plot instead of ggplot and I am not able to get the…
1
vote
1 answer

Return Longest Wiggle Subarray

Given an array of numbers, (or in this case a pandas series) return the longest wiggle subarray. A wiggle array is one such that the numbers alternate in direction- they go up and down strictly. I.e. Input: [10, 22, 9, 33, 49, 50, 31, 60,…
Andrew Louis
  • 303
  • 1
  • 2
  • 15
1
vote
1 answer

Image compressing - zigzag after Discrete Cosine Transform

I'm trying to make application which compress image from camera. I have mat image and 3 separate arrays for channels. I've found something about discrete cosine transform DCT and read that I should do zigzag algorithm (I've found something with…
Charles
  • 33
  • 1
  • 5
1
vote
1 answer

determine if a set of points form an approximate line

I am making a line/arc detection algorithm. I found this pesky set of points : [(215, 69), (217, 70), (220, 67), (223, 65), (226, 64), (229, 62), (232, 60), (236, 57), (239, 56), (242, 54), (245, 52), (248, 50), (251, 48), (254, 47), (257, 45),…
Abel Tan
  • 37
  • 3
1
vote
2 answers

ZigZag binary tree traversal in C++

I am trying to attempt zig zag traversal of binary tree. But I am stuck at one type of test cases, i.e., when the tree is not balanced. If I give my input as 3 3 9 20 null null 15 7 for a binary tree which looks like this: 3 / \ 9 20 …
Akriti Anand
  • 166
  • 3
  • 17
1
vote
1 answer

Zigzag footer change triangle color

I have a footer and im trying to do it with a zigzag border, it working properly but i want to change the color of the triangle to this color #67BA4D, how can i do that? here is my code: .BottomFooter { position: relative; background-color:…
stephjhonny
  • 227
  • 3
  • 9
  • 22
1
vote
2 answers

Function to Create a Zigzag Array in Python

I'm trying to create an array of positive and negative integers, representing distances north and south of a location - I need to see the elements of the array in zigzag order. This means that the largest member appears first, the smallest member…
HappyHands31
  • 4,001
  • 17
  • 59
  • 109
1
vote
1 answer

Zig Zag Line across menu buttons CSS

I've done some research into this but can't seem to find the right info. I'm trying to get a zigzag line across the top of my nav bar: I've created the above image to explain things very simply. The top zigzag is an image and I'd like to get the…
CYBORG
  • 104
  • 2
  • 4
  • 11
1
vote
2 answers

Buy & sell after local minima and maxima

I've got a data series which is of the form date. open high low and close (prices). I want to create local maxima and minima for the close column of the data. I further want to buy after 2 days of local minima @ close and sell after two days of…
Ashish Jalan
  • 181
  • 8
0
votes
0 answers

How to add double/top formation to existing zigzag function

Below zigzag function is working. I would like to add double/top formation to this zigzag function. How to do this? I have spend three evenings googling a solution and tried hard with chatGPT, but no luck so far. //@version=4 study("ZigZag1color",…
User4536124
  • 37
  • 1
  • 11