2 added 179 characters in body
source | link
list1[a_] := List[
  {(w + a), -d},
  {-a, -d},
  {-(w + a), -(t + d)},
  {-a, -(t + d)},
  {-a, -d},
  {(w - a), -d},
  {-a, -(t + d)},
  {(w - a), -(t + d)}]

list2[a_] := List[]

For[i = 1, i <= 8, i++,
 list2[a_] := Evaluate[Append[
    DownValues[list2][[1, 2]], list1[a][[i]]]]]

list2[1]

{{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}}

list1[1] == list2[1]

True

As an alternative to a For loop Array can be used here, e.g.

Array[(list2[a_] := Evaluate[Append[
       DownValues[list2][[1, 2]], list1[a][[#]]]]) &, 8];
list1[a_] := List[
  {(w + a), -d},
  {-a, -d},
  {-(w + a), -(t + d)},
  {-a, -(t + d)},
  {-a, -d},
  {(w - a), -d},
  {-a, -(t + d)},
  {(w - a), -(t + d)}]

list2[a_] := List[]

For[i = 1, i <= 8, i++,
 list2[a_] := Evaluate[Append[
    DownValues[list2][[1, 2]], list1[a][[i]]]]]

list2[1]

{{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}}

list1[1] == list2[1]

True

list1[a_] := List[
  {(w + a), -d},
  {-a, -d},
  {-(w + a), -(t + d)},
  {-a, -(t + d)},
  {-a, -d},
  {(w - a), -d},
  {-a, -(t + d)},
  {(w - a), -(t + d)}]

list2[a_] := List[]

For[i = 1, i <= 8, i++,
 list2[a_] := Evaluate[Append[
    DownValues[list2][[1, 2]], list1[a][[i]]]]]

list2[1]

{{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}}

list1[1] == list2[1]

True

As an alternative to a For loop Array can be used here, e.g.

Array[(list2[a_] := Evaluate[Append[
       DownValues[list2][[1, 2]], list1[a][[#]]]]) &, 8];
1
source | link

list1[a_] := List[
  {(w + a), -d},
  {-a, -d},
  {-(w + a), -(t + d)},
  {-a, -(t + d)},
  {-a, -d},
  {(w - a), -d},
  {-a, -(t + d)},
  {(w - a), -(t + d)}]

list2[a_] := List[]

For[i = 1, i <= 8, i++,
 list2[a_] := Evaluate[Append[
    DownValues[list2][[1, 2]], list1[a][[i]]]]]

list2[1]

{{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}}

list1[1] == list2[1]

True